Need help with 6 and 8

Add 27 to get
... 5x = 2x + 21
... 3x = 21 . . . . . . . subtract 2x
... x = 7 . . . . . . . . . divide by 3
Then we can find the expression values to be
... 5x -27 = 2x -6 = 5·7 -27 = 2·7 -6 = 8
The side of the pentagon is 8 inches.
Where P, L, and W represent the perimeter, length, and width of a rectangle, respectively, the relation between them is ...
.... P = 2(L+W)
We can divide by 2 and subtract W to find L
... P/2 = L +W
... P/2 -W = L
And we can fill in the given values for perimeter and width ...
... 102/2 -17 = L = 34
The length of the rectangle is 34 inches.