Sorry I should have made myself clearer. In Prague itself German won't be any more useful than Czech (i'd guess that if the OP wants to spend the rest of his trip travelling in the Czech Republic then Czech would be a far better choice than German). However, given the OP's other travel plans, I think he would be better off studying German than Czech because German is useful in more places - certainly more useful in Vienna and Munich, and I'd guess more useful in Budapest (though I don't know how similar Czech is to Hungarian).
Given that the OP apparently wants to travel more in Europe in the future i'd say German would be a good language for him to learn anyway given that, at least in written form, it has similarities to Dutch, Swedish and Danish (though unfortunately it sounds completely different). Besides which there are a lot of German tourists in Europe and one tends to see things translated into German from the local languages - though not as frequently as they are translated into English.