The first airline determines how many bags you can take. The only exception is that sometimes the long leg determines whose rules you fall under.
You should pay to the airline with whom you first check in. They should be able to check bags all the way through.