Meow? Math question. Which is the correct way of doing this?

Say i have a math problem of AB2 <ab squared> converting it to c.

1 Do you multiply a times b then square

2 Do you square b then multiply by a

example a = 3 b =7

if you do it by number 1 you have 3*7 = 21 then square = 441

if you do it by number 2 you have 7 squared = 49 then times 3 = 147

which is the correct answer? Meow?

i have one book that says one way and another that says the other way?