Juan, this seems long and complicated and it sounds more like being brushed off than a scam, but I can understand why you are ***.
If I have this correctly, your wife has successfully transferred the mobile number over to her new network with her PAC code but you were still billed by T-Mobile. If this is true, you have no contract with T-Mobile to deal with in this case and you 'should' expect full reimbursement. Your brother's problems in transferring the number over should have been explained by both the new network and T-Mobile at the time, but the new network should have been chomping at the bit to get their contract started, so there's more to this I think. (Did he have a current contract running or was he starting a new one?) T-Mobile didn't tell you they would keep billing you but this isn't a problem (in my knowledge) as you had filed for cancellation UNLESS they didn't/don't accept it over the phone - this is your first problem as it doesn't matter whether your PAC code is used or not! Your second problem is the PAC code not being ported and the reasons why from T-Mobile. Your third and final problem is why they didn't cancel the contract the 2nd time of asking when you phoned up compaining after receiving your March bill (although this becomes void after problem 1).
You have also carried this on far too long and should have dealt with this in writing after the 2 contracts ended and you had trouble with porting the PAC code - never complain and expect anything to be done over the telephone. Whereas the writing of a clear and concise letter and sending it by recorded delivery is seen as hassle, companies 'should' deal with it as it becomes 'official' this way. I can only hope you have gone down this route before taking this 3rd party to court, as the judge will send you away to seek settlement through all possibilities before bothering them.
Write or email (with receipt on being read) to the Executive Office at T-Mobile - set down in bullet points your exact problem to make it easier to understand and ask for this to be sorted out giving a deadline (usually 14 days). Remember, you're claiming that the contract wasn't ended when T-Mobile agreed it would - PAC codes are an irrelevant excuse!