How do you know to add for the first one and multiply for the second??

Answer:
When you multiply the variables with different exponents, you add. When you multiply an exponent with another exponent, you multiply.
Step-by-step explanation:
Answer above