Calculating distance road

Hello,

I struggle for a long while with solving this problem, but can't seem to find a solution. I'm not really a mathematical genius.

On asks to calculate the quickest route from A to B (by foot).

There are 2 ways to get there:

1. From A to X at 5 km/h and then from X to B at 2 km/h -> this route takes 16 minutes 59 seconds

2. From A to Y at 5 km/h and then from Y to B at 2 km/h -> this route takes 19 minutes 25 seconds

The aim is to find out what the distance is

From A -> X and X -> B

From A -> Y and Y -> B

There are a few catches .

- The angle between A-> X and A-> Y is 95°, but I do not know whether this is important.

- The angles between A-> X and X-> B and also A-> Y and Y-> B are not necessarily 90 °

Thus Pythagoras is in my eyes not suitable for solving this problem.

How should I deal with this problem? Preferably as understandable as possible please.

Thanks

Eddy