The answer to 'how to fix P-trap' is to disassemble the P-trap, clean out any debris or clogs, and reassemble it properly. P-traps are the curved pipe section under sinks that prevents sewer gases from entering your home. Over time, they can become clogged with hair, food particles, and other debris, causing water to drain slowly or back up.
To fix a P-trap, first place a bucket or towel under the trap to catch any water. Then, use a basin wrench to loosen the nuts on either side of the trap and remove it. Inspect the trap for any clogs or damage, and clean it out using a pipe brush or wire coat hanger. If the trap is damaged, you may need to replace it. When reassembling, make sure the trap is properly angled to allow water to flow freely. Tighten the nuts securely but don't overtighten. Run water to check for any leaks, and you're all set!