We are given two equations, x + y = 5 and 2y - x + 1 = 5, and we need to find the value of x.
From the first equation, we can rearrange it to get x = 5 - y.
Substituting this value of x into the second equation, we get:
2y - (5 - y) + 1 = 5
Simplifying the equation, we get:
3y - 4 = 5
Adding 4 to both sides, we get:
3y = 9
Dividing both sides by 3, we get:
y = 3
Substituting this value of y into x + y = 5, we get:
x + 3 = 5
Subtracting 3 from both sides, we get:
x = 2
Therefore, the value of x is 2.