Why do P-waves travel faster through the inner core than the outer core?
I think it is due to the higher density.
The enormous pressure in the inner core means bonds between the (mainly) iron and nickel atoms are ‘squashed’. This raises their energy and consequently their stiffness.
The speed of any wave is determined by the strength of the restoring force, thus explaining why waves travel faster on a top guitar string (to yield a higher frequency for the same (half) wavelength) than on a ‘looser’ (lower tension, lower restoring force) bottom string.