Two mountain bikers leave from the same parking lot and head in opposite directions on two different trails. The

first rider goes 8 km due East, then rides due south for 15 km. The second rider goes 8 km due West, then changes
direction and rides 20 degrees west of due north for 15 km. (See the picture below.) Both riders have been traveling
for 23 km, but which one is further from the parking lot?

The first bikers path is a right-angled triangle, so

d^2 = 8^2 + 15^2 = 289
d = 289 = 17 km

second biker:
use cosine law:
d^2 = 8^2 + 15^2 - 2(8)(15)cos135
= 289 + 169.705..
d = √458.7.. = appr 21.42 km