(b) When two blocks performs simple harmonic motion together then at the extreme position (at amplitude $= A$)
Restoring force $F = KA + 2ma$
$\Rightarrow a = \frac{KA}{2m}$
There will be no relative motion between $P$ and $Q$ if pseudo force on block $P$ is less than or just equal to limiting friction between $P$ and $Q$
$i.e.$ $m = \left( \frac{KA}{2m} \right) =$ Limiting friction
$\therefore$ Maximum friction $= \frac{KA}{2}$