Equation of a line whose intercepts on the axes are $a$ and $b$ is $\large\frac{x}{a}$$+ \large\frac{y}{b}$$=1$

This can be written as

$ bx+ay=ab$

or $ bx+ay-ab=0$------------(1)

The perpendicular distance $d$ of a line $Ax+By+C=0$ from a point $(x_1, y_1)$ is $ d=\large\frac{|Ax_1+By_1+C|}{\sqrt{A^2+B^2}}$------------(2)

Now comparing equation (1) and (2) we get,

$A=a, B=b $ and $ c=-ab$

$\therefore$ perpendicular distance of the line passing through the point (0,0) is $p = \large\frac{|A(0)+B(0)-ab|}{\sqrt{a^2+b^2}}$

$ \therefore p = \large\frac{|-ab|}{\sqrt{a^2+b^2}}$

Squaring on both sides we get,

$p^2=\large\frac{(ab)^2}{a^2+b^2}$

$ \Rightarrow p^2(a^2+b^2)=a^2b^2$

(i.e.,) $\large\frac{a^2+b^2}{a^2b^2}$$= \large\frac{1}{p^2}$

$ \Rightarrow \large\frac{1}{p^2}$$ = \large\frac{1}{a^2}$$+\large\frac{1}{b^2}$

Hence proved.