Acceleration of the `(A + B)`down the plane `= g sin theta` .In both the blockand weight , friction between then will static . The block `A` is at rest w.t.t. wedge `B`

From `FBD` of `A` :
`N = mg - ma sin theta `
`f = ma cos theta`
For no sliding between `A` and `B` .
`f lt mu N`
` mg sin theta .cos theta lt mu(mg - mg sin ^(2) theta)`
or `mg sin theta .cos theta lt mu mg - mg (1 - sin ^(2) theta)`
`sin theta cos theta lt mu cos^(2)theta`
` rArr tan theta lt mu` or `theta = tan^(-1)(mu)`