Assuming that 4(x - 2) and (5x - 20) are the side lengths.....because all sides of a square are equal, we have
4(x - 2) = 5x - 20
4x - 8 = 5x - 20 add 20 to both sides, subtract 4x from both sides
12 = x
So....the side length is 4(12 - 2) = 4 * 10 = 40 cm