You actually don't need the law of cosines because the angle between the legs of the trip is 90°. Just use Pythagorean Theorem to solve for A to C. The times are proportional to the distances for constant velocities, so just treat the values as weird distance units.
If the angle had been other than 90, you would have solved for c using c2 = a2 + b2 - abcos(θc) where the angle indicated is the one opposite to c in the triangle.
Oh wait, the terms used were wrong if they have given angles α and β. In that case you use the cosine law with θ = α + β for angles on the diagram. (You can't solve this without those angles)