He wasn't "cut loose." He was an UFA and the Panthers have no cap room thanks to extending LT Jordan Gross and franchising Julius Peppers. They wanted him back badly because he can start and play well at center and guard, and their interior OL has proven to be injury-prone.
Oh and Jason Brown, who probably got twice as much as Hangartner did, was a 4th rounder. Jason Peters was an UDFA. Mike Williams was a 1st rounder.
Given that he'll be 27 in a couple months, he's the permanent answer until he proves otherwise. I don't see the Bills taking a center high in the draft, but could see a later-round pick (like say a 4th or 5th rounder ).
Frankly there's a lot to like about Hangartner. He's smart (47/50 Wonderlic) but nasty and a lockerrrom leader, has good size (315#), seems durable (hasn't missed a game in 4 years), versatile (can play OG or OC and plays on ST's), and in 27 starts he gave up just 4 sacks and 2 penalties. He also received good coaching in Carolina. The only area I don't know is run-blocking, but the Panthers were a pretty good running team last year, when he started 8 games, which says a little something.