In this problem, you have already shown the solution.
24 = 3y - 6 => 30 = 3y, y =10
12 = 5x + 2 => 10 = 5x , x = 2
And yes, basically parallel sides must have the same length
These are the answers:
for 17.) x = 2
y = 10
for 18.) mid segment = (side 1 + side 2) / 2 -->
19 = (24 + side2) / 2 -->
38 = 24 + side2,
thus, side 2 = 14 units