We can use Pythagorean theorem for right angle triangle to solve this problem.
The diagonal line would be hypothenuze. Horizontal and vertical distance would be other two sides of a triangle.
We will use the following formulas:

Where opposite side is vertical distance and adjacent side is horizontal distance.
Solving for these two sides we have:

We insert numbers and we get solution:
