It depends in the reference frames from which the events are viewed.
Work Step by Step
Viewed from different frames of reference that are in relative motion, events can occur in the order AB in frame S, but in the order BA in frame S'. It should be noted that this does not apply to all pairs of events. A more advanced physics course reveals that if the two events cannot, even in principle, be linked by a beam of light, their order of occurrence can be reversed.