The only thing Han says in reference to the encounter is that he "got there as fast as he could", so there's not much in the film to give us a clue as to how. But it's not that implausible a situation.
The fight on the ship by those left behind lasted no more than a few minutes at most, plus another couple minutes to for Qi'ra and Han to part ways. That means Beckett had only a few minutes head start at best, and at walking pace. Catching up would have been fairly easy even without transport.
As to why he chose to show up in front instead of behind, at the very least it means he can set the terms of engagement. If coming from behind, he's going to have to work with whatever terrain they're in by the time Beckett hears him coming up, which could potentially be disadvantageous. If Beckett is crossing a ridge and Han is out in the open for example, Beckett could take cover and Han would be in trouble. But by moving ahead and finding a place of his choosing to have the confrontation, he at least has that working in his favor (or at least not disadvantage).
As to why he didn't take cover and ambush, it's pretty clear he wasn't keen on shooting someone he once looked up to and considered a mentor/friend, and wanted to talk him down first. When it was clear that Beckett's intentions were still malicious, Han took the shot.