After separation, the first stage of a Falcon 9 makes a boost back burn. When watching the webcast of the NROL 108 mission, after boost back it has a speed of 830 km/h at an altitutde of 148 km, then it gains more speed and decreasing altitude. That means the vertical speed reaches a value of zero but still has an 830 km/h horizontal speed. How it can come back to the landing pad near the launch pad? Shouldn't it go far away?
Borrowing an image from Hobbes' answer to What is the burn time for the F9 boostback / reentry / landing burns?
The feed shows speed, but not direction. By the time the booster reaches its peak altitude, it is already moving back towards the launch site.