Will living in Bratislava for a year and Prague for a few months help me in learning to speak/understand Polish? I noticed some familiar words ("albo" is "alebo" in Slovak, "praca" for work, etc.) but of course there are many differences (Czechs/Slovaks don't have "dła").
Slovakia more than Prague.... (although Czech seems a bit more similar in some ways) and the biggest benefit will be learning the morphology and syntax of Slavic (except for Bulgarian/Macedonian) languages - the cases and case agreement systems and the very different (far simpler!) verb systems of Czech and Slovak will come in far more handy for understanding Poland than the words on their own.
A problem in both countries is the larger variety (and presence in public life) of regional dialects compared to Poland where most dialects have mostly disappeared in favor of more or less standard Polish.
Vocabulary-wise it could be helpful but you will need to re-acquaint yourself with proper Polish pronunciation as Slovakian is spoken "harder" than Polish.
You can get familiar with a Polish/Slavic accent when you talk to a Slovak. Some words are pretty similar, but some may have a different meaning. In general, it can help with your speaking/listening language abilities, but it won't directly affect your Polish language knowledge.