Personally I'd pick the D5100.
-Better sensor (D7000)
-16mp takes up gobs up memory and creates massive images, I can't imagine what 24gb would do in RAW. If I could I would make my D7000 10.2mp.
-The flip out screen flips inward to protect the screen when traveling.
The D3200 is good too, you can't go wrong with either. I had a D3000 though and it really treats you like a noob which gets old after a month or so. Alot of avid amateurs use the D5100 as a backup and alot of pros use it as their 3rd camera.