Ah, so you don't need the code that calculates the p-factor, but rather the setting/factor the aircraft needs for that.
That'll be in Aircraft/PA28/PA28-161-160.xml or Aircraft/PA28/PA28-161-180.xml, line 42. The location of your aircraft directory depends on your setup, if you have downloaded the aircraft using the launcher, iirc it's typically inside your FG_HOME folder, you can find its location here: https://wiki.flightgear.org/$FG_HOME#Windows
The value there is set to 5 currently. Just wondering, who has recommended to reduce it?