The equation of the line below can be expressed in the form
\frac{x}{a} + \frac{y}{b} = 1.
Find a.
Substitute the values of the coordinates given for P into the equation to get one equation for a and b; then substitute the coordinates given for Q into the equation to get another equation for a and b. You now have two simultaneous equations for two unknowns, so you can solve for a and b. (Tip: it is easier to make the substitutions u = 1/a and v = 1/b first; solve for u and v then set a = 1/u and b = 1/v).