We know the distance between two points in a cartesian coordinate system.
$d=\sqrt{(x_{2}-x_{1})^2+(y_{2}-y_{1})^2}$
So how can we find the formula for the distance between points $A(x_{1},y_{1}), B(x_{2},y_{2})$ in a parallel coordinate system?
(Parallel Coordinate system : Let's take two lines intersecting each other at any angle in the plane. Let's orient these lines by thinking of them as number lines and consider these number lines as coordinate axes.From any point P in the plane to a pair consisting of numbers corresponding to the marked distances of the parallels drawn to these axes; They are called parallel coordinates of P or Descartes coordinates.)
Just use the cosine rule: $$d=\sqrt{(x_{2}-x_{1})^2+(y_{2}-y_{1})^2-2(x_{2}-x_{1})(y_{2}-y_{1})\cos(\pi-\theta)}$$ or $$d=\sqrt{(x_{2}-x_{1})^2+(y_{2}-y_{1})^2+2(x_{2}-x_{1})(y_{2}-y_{1})\cos(\theta)}$$ where $\theta$ is the angle between the axes.