There is a problem. I try to explain:
through the point x,y pass infinite rows. If you want to leave a as a parameter, you have to force a contition to b, and this condition depends on the fact that the rows have to pass through the point x,y.
For example, the first row has to pass to x,y and has a=50. x,y are fixed, so you have to compute b as:
b = y-a*x
THEN you can find the line whith x=1:256.
Do you understand?