Can I use my old T-Mobile iPhone 5s while my Sprint iPhone 7 is being repaired?

My Sprint iPhone 7 is having hardware problems, but I need a working phone As soon as possible (my job is through my phone). I called Sprint to ask if my iPhone 5s from T-mobile would be compatible.

At first they said yes, and then they said no that it would have to be a Tmobile iPhone 6 or higher.

Is there a way I can jailbreak it for it to work or something? I need a solution.

If your old iPhone 5S is unlocked and can run both GSM and CDMA frequencies then yes

Jailbreaking isn't going to help you at all.

The thing is that your T-Mobile phone has to be unlocked by T-Mobile first. Then, you can try to use it on Sprint. However, Sprint usually only accepts Sprint phones so there's no guarantee that your T-Mobile phone would work at all.