Porting a number has to do with moving your number from one phone company to another. You are not changing phone companies. You are just upgrading your phone. Go here:
https://buyiphone.apple.com/WebObjects/IPACustomer.woa/
and select "replace a phone on your existing account"
Then pick the $199 or $299 phone that you want. Thats all.
Why would you exit your contract (Pay $175), and then start a new contract, instead of paying the $199/$299 price you can pay for your 3GS.
You say you have a 2G iPhone, so you'd be eligible for the $199/$299 price.
Also, if you cancel your contract (EFT), you can't start another with AT&T for 2-3 months.