Well just since there may be people that don't know looking at this question, a raid lockout is a week-long lockout that starts when you kill a boss in a raid instance. They then reset every tuesday (the classic raids may have different times though.)
Now on to your question. The person who gets the saved raid in that situation would be the raid that has the first person zone in. If they both split and try to enter, the first person in, their raid will get the lockout. The second group in will get a message along the lines of "You do not belong to this group's instance. You will be teleported to the nearest graveyard in 60 seconds." or something like that.
Tl;DR First come first serve, have at you.