The gradient at any point P (x, y) on the curve is given by dy/dx
According to the problem
dy/dx = (x - a)/(y - b)
Separating the variables,
(y – b) dy = (x – a) dx
Integrating,
∫(y – b) dy = ∫(x – a) dx
(or) (y – b)2 = (x – a)2 + b2 – a2 is the required equation of the curve.