Does an electromagnet use more energy when it is repelling another magnet? Kind of a strange question.  Is the amount of energy used to power an electromagnet directly proportional to the amount of work an electromagnet does?  
That is, if I were to power an electromagnet with hypothetical battery that does not drain, will that electromagnet always output the same level of magnetism, regardless of external influence such as magnetic objects attracted by the electromagnet?  Does magnetism have a "cost" that diminishes the magnetic field in some way?  
 A: Let's imagine you have an electromagnet and so does your friend. You are a lighthour apart in distance and have never turned them on.
You turn yours on for a two minutes, then turn it off. You used a certain amount of power, some of that power went to making magnetic fields in a shell that expanded away from you.
61 minutes after you turned yours on, your friend flips on their electromagnetic. First thing first, no one goes back in time 61 minutes and makes you use more power.
However your friend is turning on an electromagnet when there is already a magnetic field present. So the energy of the magnetic field there is the energy from your magnetic field plus that energy of the magnetic field created by them, plus an interaction energy (which could be positive or negative). And all of that energy came from somewhere. We know where the enegy for your magnetic field came from. But the interaction energy and the new magnetic field energy both need to be supplied by your friend. Energy is supplied to the electromagnetic field by current flowing the opposite direction as the electric field. So if your friend needs to push them extra hard to supply that extra energy, that enegy comes from your friend. That said, maybe your friend pushes them just as hard as usual and just don't make as much current as your friend had hoped.
A: Whenever you have moving magnets in electric fields, you generate emfs. Both electromagnets have electric and magnetic fields, and will induce currents in the other, except when they are static. That will involve energy going into the new distribution of fields, plus resistive losses. 
