Having grown up in Edinburgh, and then did my degree in Aberdeen, I think I might be qualified to ask this question.
I didn't go to RGU, but I know that not all of their classes are in town, there's a campus a bit out of town called Garthdee, so you might have the 'out of town' thing with both universities. Heriott-Watt is a lovely campus, and I have friends there who really like it, and they live in the city. I agree with BeyondAndAbove, you'll get used to the commute if you chose to live in the city.
I find that Edinburgh and Aberdeen kinda match up in terms of what they offer on a 'what you need to live' basis (such as shops, local transport, typical leisure activities, living space).
I would say there is more cultural events in Edinburgh, and far more venues and galleries so if that's your bag, pick Edinburgh. Edinburgh also has more nightclubs and you can get to Glasgow quickly for further entertainment! There is a lot of parks in Edinburgh as well, one thing that has struck me as difference, Aberdeen just doesn't seem to be anywhere near as green as Edinburgh. But then, Edinburgh is unusual in that respect. Aberdeen has a better beach though.
Aberdeen is more your average working city with shops, typical leisure activities (cinema, restaurants etc) but a lot less of the culture and definately less gigs (although a lot comedians manage to make their way here). Aberdeen is out of the way, takes 2.5 hours on the train to get to the central belt (Edinburgh/Glasgow and inbetween, where most people in Scotland live), and at least 3 hours on the bus, so it can feel isolated sometimes. Also the city that gets the most snow through the year apart from Inverness, I'm guessing. Rental price in Aberdeen is perhaps surprisingly high (I'd budget at least £300 a month, and £350 is more likely), because of the oil industry. If finance is an issue, bear that in mind. I think Edinburgh could be a bit cheaper, but I'm not sure, never had to rent here.
Lastly, weather wise they're probably similar but Aberdeen is probably a bit colder, and the winter in Aberdeen can seem neverending with the little amount of daylight, especially as that's when you'll be there for classes, but if you head home then not so much in the summer which is amazingly light.
So that's my kind of potted city guides. Pair that up with what you are thinking of the universities, and I'm sure you'll make the right choice. Given that you are trying to pick a back-up option out of them, you might not even end up at either!