Even if your horse sees the trail, you should never ride up into another horses' tail. It can cause all sorts of accidents - the lead horse may kick, he might stumble and then your horse would crash into him and stumble as well, your horse might cause the lead horse speeding up out of control if the lead horse takes it as a challenge to race, your horse might step onto the hind legs of the lead horse and cause him to trip, and so on...
First, you should practice your stops and transitions in an arena. When everything is going fine, you can hit the trails again and, in the beginning, practice on holding the distance at the walk and the trot. Only when the horse is fully obedient in the slower gaits, you may canter and be very demanding when it comes to keeping the distance. Teaching independence - standing while the lead horse walks, trots and even canters off or in the opposite direction, going in opposite directions or past each other - will be very beneficial as well.
As I don't know the level of your experience, I won't go into details right now, but don't hesitate to ask for help of a more experienced rider or a trainer, if you need to.
I have come a long way, to surrender my shadow to the shadow of my horse.