If you are short on time, Prague will be the better choice seeing as it's a smaller, walkable city with better day trip options. If you have a little more time and happen to love food, Budapest will give you a few more options to fill your days, plus, the thermal spas are world-class.