Let x = the side of the square
L = 50 - 2x
W = 30 - 2x
V= x(50 - 2x)(30 -2x) = 1500x - 160x2 + 4x3 = 3000
Collect and divide by 4
x3 - 40x2 +375x -3000 = 0
Graph this equation and you will see that 10 is a root, i.e. x = 10 and the sides are 30 and 10 which works
There are 2 other roots which may work as well but they are irrational roots which you can find by dividing out the root 10 to get a quadratic which can be solved by formula.