Rob Peter to pay Paul

To take something from one person or thing to pay another.

When the government began to take money from the education system to pay for the medical system it was like robbing Peter to pay Paul.