Let the track length be represented as 10x.
When they meet at 10 am, ant A has traveled 6x of the distance, and ant B has covered 4x of the distance.
Therefore, the speed of ant A to the speed of ant B is \(\frac{6x}{4x}=\frac{3}{2}\).
The ratio of the time taken by A and B to cover the same distance is \(\frac{2}{3}\).
The distance by ant A from the meeting point to point P is 4x, and similarly, the distance covered by ant B from the meeting point to point P is 6x.
Given that ant A took 12 minutes to reach point P, the time taken by ant B to cover a distance of 4x is \(\frac{3}{2}\times12=18\) minutes.
However, ant B needs to cover a total distance of 6x.
Hence, the time required is \(\frac{6x}{4x}\times18=27\) minutes.
Therefore, ant B reaches point P at 10:27 am.