Since y is equal to both 5-x and to x+1, we know that 5-x is equal to x+1. We can write 5-x=x+1. Take 1 away from each side: 4-x=x. Then add x to each side: 4=2x. Divide both sides by 2: 2=x. Now we have x, we must remember to substitute x back in to find y! Choose either equation and solve with x=2. We have y=5-x=5-2=3 (y=3) or y=x+1=2+1=3. (y=3). So x=2 and y=3 is the solution.