Solve simultaneous... y-2x-1=0 and x squared+xy-5x-y+2=0

y-2x-1=0 so y=2x+1

x^2+xy-5x-y+2=0
x^2 + x(2x+1) - 5x - (2x+1) + 2 = 0
x^2+2x^2+x-5x-2x-1+2=0
3x^2 - 6x + 1 = 0

and you can take it from there, I assume