See following image. Who is Run-out?
B is out. The batsmen haven’t crossed each other and B is closer to the end where the fielder puts the wicket down.
From the wikipedia Page
The batsman can be judged run out when he is closest to the end where
the wicket has been put down by the opposition and no other batsman is
available inside the crease of the same end.
Another Reference.Check the 3rd Point