According to ESPN’s Arash Markazi, the players already had flights booked to the US when they were informed that Trump was getting involved.

Everyone knows about the UCLA players arrested in China for shoplifting but no one really knows what happened until now. For the first time, here's what they actually stole, how they got bailed out and what Trump actually did (or didn't do) to help them. https://t.co/ZFKcTUjDUm

The charges against the UCLA players had been dropped, the bail was returned, their passports were given back and their return flight home was booked two days before they got a call from Gen. Kelly for the first time informing them that Trump was getting involved on their behalf.

“The situation was already resolved by the time we heard about Trump’s involvement,” one team source said. “That’s not to take away from the fact that he got involved, but the players already had their passports back and their flights booked to go home Tuesday night when Gen. Kelly called the players.” […]

“The players were already checked into the hotel before the public discovered they were arrested,” a team source said. “They also were not under house arrest. It was our decision to keep them at the hotel until the situation was resolved. The charges were dropped, they weren’t reduced, and that happened two days before we heard from Gen. Kelly.”