Congratulations, you are very close to learning how to dock properly.
It doesn't have anything to do with cruise engines, speed, engine-kill etc. - you just have to fly your ship to the proper docking position and you will be docked without delay. With jumpgates, tradelane rings, docking bays etc. you also have to be oriented properly ('nose first into the gate' - some NPC transports take several minutes and a lot of helpful ramming before they realize the benefits of this approach
) but the planetary docking rings will dock you regardless of your current orientation.
When you approach a planetary docking ring and you find that some bleeping NPC has initiated docking from several light years away (well, kilometres) then you need to fly into a position that is similar to the normal fast-docking spot but slightly off-centre, so that the NPC can pass you when it flies along the axis as usual. Then issue the dock command. You will be docked together with the NPC, perhaps a few metres before or after.
Note: docking from the side at cruise speed is slightly more difficult in a heavy fighter than in a light one (because the heavy fighters have more inertia and cannot stop abruptly) and with freighters it is a tad more difficult still because they have even higher inertia and very bad turning rates. But it is doable with a bit of practice, and if you are a trader then you don't have anything else to do anyway.