Suppose we have a rectangle with area 50 and perimeter 30. Let's set up equations to find the side lengths.
ab = 50
2a + 2b = 30
Now we need to get one variable alone on one side.
a + b = 15
a = 15 - b
Use substitution and solve.
[tex]a = 15- b\\ (15-b)b = 50 \\ b^2-15b = 50 \\ b^2-15b+50=0 \\ (b-5)(b-10) = 0 \\ \boxed{b=5\ or\ 10}[/tex]
So we now know that the square has dimensions 5 and 10. Let's find the surface area.
[tex]SA = 2wl + 2wh + 2lh \\ SA = (2*5*10) + (2*5*7) + (2*10*7) \\ SA = 100 + 70 + 140 \\ \boxed{SA = 310\ u^2}[/tex]