For the Best Buy program, the original phone must have been purchase at Best Buy. On trade in, they will give you an option of straight cash or BB gift card. Right now my iPhone 4 16 gig is worth ~$180 for the cash and ~$270 if I choose the gift cards.
The buy back also has nothing to do with the carrier subsidized pricing, so if you recently purchased a 4S, you'll have to pay the full price for the iPhone "5"