A triangle with sides 2x, 4x - 2, and 2x + 7 has the same perimeter as a square with sides of 2.5x. What is the value of x?
A. -4
B. 2
C. 4
D. 6
