I would've done it using simultaneous equations to get rid of variables.
Ex:
x + 4y = 17 <-- multiply by -3 so you can cancel the x values when you add equations
3x - y = 12
=>
-3x -12y = -51
3x - y = 12 <-- add the equations
=>
-13y = -39
-y = -3
y = 3
Then, solve for x by substituting a y value in one of the equations:
3x-(3)=12
3x=15
x=5
Either way works, but just to show you there are two ways of doing this