If it was me i would fly. You wouldn't be able to make both cities in 7 days by land. It's also going to be a busy 7 days if you want the two cities. You will need at least 2 days in Xi'an and at least 3 days in BJ if you want to see the wall plus 3-4 other places while your there. Xi'an has a couple things, of course the warriors, and you also have the muslim quarter and the city wall...
As for getting around, in BJ its no problem, they have a pretty extensive metro. InXi'an on the other hand, it only have one line going north to south. They do have a decent bus system, but its in chinese...
I would just got to BJ for the seven days. I've been twice and i've stayed 10 days there both times. Theres always something to discover..
Save Xi'an for a long weekend...
“Twenty years from now you will be more disappointed by the things you didn’t do than by the ones you did do. So throw off the bowlines, sail away from the safe harbor. Catch the trade winds in your sails. Explore. Dream. Discover.” – Mark Twain