I don't know for a fact but I don't believe the second person would be allowed to ride. As soon as the park closes the entrance to the queue is closed so that nobody else can join the line. I believe in order for the second person to ride, they must have joined by queue prior to park close.