When a body of mass $m$ slides down on inclined plane with acceleration $a$, then various forces acting on the body are shown in the figure.
According to Newton's second law of motion, $m a=m g \sin \theta-\mu R$
$\Rightarrow m a=m g \sin \theta-\mu m g \cos \theta$
$\Rightarrow a=g \sin \theta-\mu g \cos \theta$
$\Rightarrow a=g(\sin \theta-\mu \cos \theta)$