2xy + y = 10 (1)

x + y = 4 (2)

I got as far as:

(2) y = 4 - x

substitute into (1)

2x(4-x) + (4-x) = 10

2x(4-x) + (4-x) -10 = 0

Question: how to know when/ why to make it equal 0?

Also, I multiply out and get

8x - 2x^2 + (4 - x)- 10 = 0

then, 7x - 2x^2 - 6 = 0

but the answer has 2x^2 - 7x + 6 = 0 at this stage

Confused.