Answer:
By doing an experiment and seeing what happens. Once you or someone else has done that, you just have to learn the equation. Having said that, if you look for patterns you can often predict what is likely. Examples are
Acid + base = salt + water
Displacement reactions
Organic reactions when you've learned the mechanisms.
Whatever the situation, learning by heart is involved. Many students waste time looking for some magic key that doesn't exist. The reason an experienced chemist knows that answer is not that they have a way to work it out, but that they are remembering it.
Explanation: