QRST is a square. It means that all sides QR, RS, ST and TQ have the same length.
You have the following expressions for two of the sides of the square:
QR = 5w + 4
RS = 2(4w - 7)
To find the value of x, you equal the previous expressions and solve for x. You can equal such expressions becasue QR is equal to RS:
QR = RS
5w + 4 = 2(4w - 7) apply distribution property
5w + 4 = 2(4w) - 2(7)
5w + 4 = 8w - 14 subtract 5w both sides
4 = 8w - 5w - 14 add 14 both sides
4 + 14 = 8w - 5w simplify like terms
18 = 3w divide by 3 both sides
18/3 = w
6 = w
Hence, the value of w is w = 6