If the area of the square is x, the area of the triangle should be (x+39 )since they say that the area of the triangle is more than the area of the square by 39 cm^2. like the same way ...
Take the real algebraic areas of the two figures like,
Area of the triangle =1/2×4y×(y+5) = gives you 2y^2+10y
Area of the square =y×y = y^2
So u can say y^2+39 =Area of the triangle, which is 2y^2+10y.
2y^2+10y=y^2+39
Then, it can form a quadratic equation frm this
as, y^2+10y-39 =0 when solved.
it gives the y value 3 .
Then find the perimeters of the two figs separately and get the difference.
P of triangle =4(3)+4(3)+4(3) = 36
P of square = 4 ×3=12
36-12=24 is the Answer.