
(a) When
$P = mg\ (\sin{\theta - \mu\cos{\theta)}}$
$f = \mu mg\cos\theta$ (upwards)
$when\ \ P = mg\sin\theta$
$f = 0$
$and\ when\ \ P = mg(\sin{\theta + \mu\cos{\theta)}}$
$f = \mu\ mg\cos{\theta\ }$ (downwards)
Hence, friction is first positive, then zero and then negative.