A number is divisible by 2 if the last digit is 0,2,4,6 or 8.
So, Here numbers would be like 20,22,24,26,28
and
A number is divisible by 3 when sum of digits of the number is divisible by 3.
So, Here numbers would be like 21,24,27
Therefore the number satisfying both conditions⇒27
That is, P→7