If the relationship is parallel, you find the gradient/slope (m) in the equation y=mx+c. Then substitute the point and the gradient/slope into the equation y-y1=m(x-x1), after that you work it out algebraically making y the subject.
If the relationship is perpendicular then you find the gradient/slope (m) from the equation y=mx+c, after doing that you sub m into the equation m1*m2= -1 (solve algebraically to make m2 the subject). Then you substitute the answer of m2 and the points into the equation y-y1=m2(x-x1).