Maximum power problem

For which test case am i getting wrong answer???