Finite geometric series/Polynomial/Exercise

Prove the formula