OK... here is a solution, using only Pythagoras' Theorem. The attached diagram shows your quadrilateral ABCD, with the diagonals intersecting at point E (all points labelled in blue capitals).

Now, if the diagonals intersect at right angles, then all four of the angles labelled in red are right angles. So, the quadrilateral becomes a system of four right-angled triangles stuck together!

Notice that I have labelled thelengthsof four lines:

Now, you just use Pythagoras on each one of the four triangles, separately. This gives you:

where is the distance you want to measure. Now, do a little bit of algebra. Start with the first equation, subtract the second one, and then add the third one. You get the following:

and so