### Theory:

If two points lie on the $$x$$-axis or $$y$$-axis, then the distance between them is equal to the difference between the $$x$$-coordinates or $$y$$-coordinates respectively.
To find the distance between two points we can apply the below formula.

The distance between the given two $A\phantom{\rule{0.147em}{0ex}}\left({x}_{1},{y}_{1}\right)$ and $B\phantom{\rule{0.147em}{0ex}}\left({x}_{2},{y}_{2}\right)$, points is:

$d\phantom{\rule{0.147em}{0ex}}=\sqrt{{\left({x}_{2}-{x}_{1}\right)}^{2}+{\left({y}_{2}-{y}_{1}\right)}^{2}}$.

Distance from Origin:

To find the distance of a point $A\phantom{\rule{0.147em}{0ex}}\left({x}_{1},{y}_{1}\right)$ from the Origin $$O$$ \((0,0))\ we can use the formula, $\mathit{OA}=\sqrt{{{x}_{1}}^{2}+{{y}_{1}}^{2}}$.