I took a taxi so I could make it in time for the appointment.

Literal

Promise [gen-の] time [to-に] be-in-time [purpose-ように] taxi [on-に] boarded.

間に合う ('be in time, make it') is an intransitive verb that takes its target with に — 'be in time for X.' Paired with purpose ~ように, it expresses 'in order to make it in time.' 乗る also takes its vehicle with に rather than を — a recurring quirk for transit and transport verbs.