First it’s important to understand Mercury had no ability to change orbit, except a single retrofire to de-orbit. It was stuck in whatever orbit the booster provided. So there was no real need for on-board navigation, since the spacecraft was on a fixed path like a locomotive on fixed train tracks. In theory if you tracked the outbound spacecraft before it goes over the horizon, then perform calculations on that, it will later show up exactly where you expect.
This is how modern-day satellite tracking apps like GoSatWatch work. They can determine exactly when a given satellite will pass overhead because the orbit is fixed, unchanging and highly predictable. Mercury was like that: GoSatWatch Satellite Tracking on the App Store
Gemini and Apollo had maneuvering ability to change orbits, so they had on-board inertial navigation and other systems to verify their 3D position and velocity in space.
By the time of Apollo, ground-based radar tracking was so accurate it could determine the location, direction and velocity of the spacecraft traveling to and from the moon, and even while orbiting the moon. I assume a less-developed version of that was available for Mercury, used to verify the pre-calculated orbit.
A ground-based or sea-based radar tracking station obviously knows its own location, and can determine by radar methods the distance to an orbiting target, the azimuth or compass direction to that target and the range/rate or closure rate of that target. Computer calculations from those determine the target position with respect to earth coordinates like lat/lon.
Even in the 1960s, radar technology was highly developed. Using only ground-based radar tracking (no on-board radar, no terminal homing guidance), the Nike Sprint ABM could be accurately guided while accelerating at 100 g to an incoming reentry vehicle moving at near-orbital velocity. This used only “command guidance” where the ground-based radar tracked both outbound missile and inbound target and essentially steered the two radar blips together.: https://www.youtube.com/watch?v=LsnkmpJhzlo
Even the old Hawk anti-aircraft missile had some ability to intercept other missiles. This was using mostly ground-based radar guidance, although the missile itself could sense reflected radar energy from the target. At 0:50 into this video, the frame-by-frame shows how accurate ground-based radar guidance could be: https://www.youtube.com/watch?v=SDvJGGiqIKE