I couldn't solve the problem in my initial attempt, so had to refer to the official solution provided where it was given as follows:
$P^5+9^5$ is divisble by $P+9$ for all P, where P is a natural number.
And now $P^5+9^5$ can be written as $(P^5+99)+58950$ where we know that complete term is a multiple of $P+9$ and also as per the question requirement $P^5+99$ is a multiple of $P+9$ which implies that 58950 also has to be a multiple of $P+9$.
Hence, the max value of $P+99=58950$ or $P=58941$
My question is why are we restricting to $9^5$, why cant we take a bigger number than this and then express it with the help of $99+ something$ as done in the solution.
Also is there any other method to solve this problem ?