It is called Blue training and only works on RS, EI, MAG, MED.
Unless you are really good I find it is best to get a tamer friend to help. Have him/her stand beside one pet and vet it for you, you stand beside the other.
You must be guilded and the pets should be bonded. Give the mare the "all kill" and target the warhorse, and vice versa. Vet your butts off, in a few moments the pet grumps will turn blue. At that point they are no longer inflicting physical damage. At no point should the words "guard me" escape your lips, doing so turns them back to green and resets the timer.
Now you have to do something to stay logged in, so I suggest training magery or some other skill that will keep you active while your pets cast on each other.
Now some players try to block the pets from making physical contact with each other at the beginning while they are green. Physically blocking pets is against the ROC and can lead to account action.
Frankly I don't see the need or benefit to doing this, I have done this solo just by setting 2 vet macro's in UOA. You only have to vet the 2 pets for 3-4 minutes until they turn blue...hence the name...blue training!
good luck!
TW