"He is talking with his brother while doing exercises."
Translation:On rozmawia z bratem robiąc ćwiczenia.
Then you have to use "ze" instead of "z". Both mean the same - "with" but "ze" is used when the next word starts with s, z, sz, ś, ż/rz or ź followed by any consonant. So:
- "ze swoim" (as there is s followed by w)
- "z bratem" (b is not one of the consonants mentioned above)
- "z serem" (notice that there is s but it's followed by a vowel)
This might seem like a weird rule but most of the times it's just impossible to pronounce such kind of phrase if you use the wrong preposition (try to say "z swoim") so then you know that "ze" is the way here. :)
Though to be honest, Polish pronounciation is so difficult in general, that the line between easier to pronounce and impossible to pronounce is thin. For instance, saying w Warszawie is barely easier to me than *w Wrocławiu would be. :D