IDid I buy something that I am not going to be able to use can it be jail broken so that I can use it on T-Mobile network
No offense, but you should have done a little bit more work before you bought the phone because, yes, you did indeed buy an iPhone 5 you cannot use (unless you become a Sprint customer).
Further, 6.1.2 is the last version of iOS 6 that can be jailbroken. But, not that that matters anyway because what we are talking about here is unlocking. Some unlocks require a jailbreak, most don't. But in most cases an unlock can happen if you don't have a SPRINT iPhone.
Here's the problem. Sprint's policy has been and for the forseeable future will continue to be, unlocking for INTERNATIONAL use only! That means, that a Sprint phone can only be unlocked to work on a carrier outside of the US. Sprint does not, and will not unlock any phone for use domestically. Even if you met the requirements to get an international unlock Sprint will NOT unlock your iPhone 5 for T-Mobile.
Any third party unlock that you may hear about for Sprint phones is going to be shady because there have been no legit unlocks for Sprint phones for domestic use by third partys. The best you could do would be to get a Gevey SIM interposer.
Sorry my friend, but whomever led you to believe that you could use this Sprint iPhone on T-Mobile was either seriously misinformed or lying to you. Sprint phones are locked to Sprint domestically and there is no way around it.
P.S. To even get an international unlock, you need to have service with Sprint for a minimum of 90 days and pay your bill on time. If they would grant your request, then again, it would only be for international use.