Personally, I hated Budapest, so Prague would be hands down my choice, but tastes are a very personal thing.
In all cases, if you opt for Prague you can skip the day trip to Bratislava, the feel is kind of samey but in a much smaller scale in Bratislava's case.