Let the breadth of rectangle be $x \mathrm{~cm}$.
According to the question:
Side of the square $=(x+4) \mathrm{cm}$
Length of the rectangle $=\{3(x+4)\} \mathrm{cm}$
It is given that the areas of the rectangle and square are same.
$\therefore 3(x+4) \times x=(x+4)^{2}$
$\Rightarrow 3 x^{2}+12 x=(x+4)^{2}$
$\Rightarrow 3 x^{2}+12 x=x^{2}+8 x+16$
$\Rightarrow 2 x^{2}+4 x-16=0$
$\Rightarrow x^{2}+2 x-8=0$
$\Rightarrow x^{2}+(4-2) x-8=0$
$\Rightarrow x^{2}+4 x-2 x-8=0$
$\Rightarrow x(x+4)-2(x+4)=0$
$\Rightarrow(x+4)(x-2)=0$
$\Rightarrow x=-4$ or $x=2$
$\therefore x=2 \quad$
(The value of $x$ cannot be negative)
Thus, the breadth of the rectangle is $2 \mathrm{~cm}$ and length is $\{3(2+4)=18\} \mathrm{cm}$. Also, the side of the square is $6 \mathrm{~cm}$.