There are a few different ways to teach a horse to square up, this is what has worked for me. First, you want to teach your horse to respond to your movements. Most horses with follow you, but many will not step away when you step into them.
The first couple of days are spent stepping away and into the horse, and asking them to respond accordingly. This should be done on both the left and rite sides.
As they become comfortable/confidant with that, I go into leading, walking/troting off together, stopping together, changing speeds at the walk and trot etc.
When they are responding to that, I then ask them to back each time we stop. (each foot should move the same # of times.) The SECOND the horse anticipates backing at a stop, you are done for the day!
This is where you need to make a decision, what hind foot are you going to set up to? The other hind foot will do the moving. Most of the time you will ask your horse to move back, hence the back at the stop. Set up the hind legs, then the front.
Reward for each small step. Go slow, and be consistent!!!
Some other small tips: (while facing your horse) bringing their head in towards you, it will make it easier for them to move their rite side, and push their head away from you will free up their left making it easier to move their left side. I hope this is what you were looking for, and good luck