Simple one. Think like this:
Let the set of activities given are the trains arriving to a particular station, with N no. of platforms.So Xs and Xe will be the train arrival times and train departure times.
So ATQ, we have to find out the value of N so that all stations can arrive and depart at their scheduled times.
As maximum 4 trains present at a time, we need atleast N = 4 platforms to accumulate all the trains so that they can arrive and depart freely at their scheduled time.
Thats it, now referring to the question, atleast 4 rooms needed to carry out the set of activities.