How do I convert P(1 + r)3 and P( 1 + r)4, etc. to the expanded form?

I get confused by the factored version P(1 + r)n. This does not help me to understand.

For example, P(1 + r)2 equals (P + rP) + r(P + rP). Show how this occurs with three and four years.