another way to do it is
2x-y=17
x-y=10, x=10+y
substitute x=10+y for x in 2x-y=17 and get
2(10+y)-y=17
20+2y-y=17
20+y=17
subtract 20 from both sides
y=-3
subsitute y=-3 into equation x-y=10
x-(-3)=10
x+3=10
subtract 3 from both sides
x=7
or subsitute into 2x-y=17
2x-(-3)=17
2x+3=17
subtract 3 from both sides
2x=14
divide both sides by two
x=7