If the quadilateral is a parallelogram, then the length of opposite sides are equal.
Thus mathematically;
2x - 2 = 12 and also 2y = 8
So let us solve both equations
2x - 2 = 12
collect like terms
2x = 12 + 2
2x = 14
x = 14/2
x = 7
Secondly;
2y = 8
divide both sides by 2
2y/2 = 8/2
y = 4