Hi and welcome to ET:
You say you own the phone, so that is a good start. Do you know if the bills were paid up to date? If so you should call AT&T to ask they provide the unlock code. If your company (or you, or whomever paid the bills) was a customer for more than 90 days, they will usually provide the unlock code.
If not, there are many companies that unlock phones for a fee. One that I know is reputable and honest is
Horizon Wireless Online. Note that if the phone was marked by AT&T as stolen or unpaid, they will be unable to obtain a code. They should not charge you if they can't do the unlock, but always read the fine print.
Finally, you mentioned Sprint. An AT&T phone will not work on the Sprint network....different technologies. TMo should operate, but you will need the TMo SIM card.
SteveTaz