T. Rowe Price interview question

Recursive functions for the technical part