Help me in solving TIMEMCQ13 problem

My issue

How do I solve this mathematically?

Learning course: Time complexity using C++
Problem Link: CodeChef: Practical coding for everyone