Let distance of object AB from lens = u
Distance of image A'B' from lens = v
Focal length of lens = f.
Triangles ABC and A'B'C are similar
Similarly triangles PCF and A'B' are similar
But PC = AB
From sign convection, CB =-u, CB' = v CF = f and FB' =CB' - CF = v - f
or -u (v - f) = vf or - uv + uf = vf