x+y=7

x=y+3

Replace x with y + 3 in first equation.

y + 3 + y = 7

2 y + 3 = 7

Subtract 3 to both sides

2 y = 4

y = 4 / 2 = 2

x = y + 3 = 2 + 3 = 5