Firstly I'd highlight the key words: equilibrium. Which implies there is no resultant force. Resolving vertically. Can see that the 8N is at an angle, we can split it into horizontal and vertical components. Doing this gives 8sin30 vertically and 8cos30 horizontally. Using trig rules of soh cah toa. Now equating vertically. P = 8sin30 +5 and resolving horizontally 8cos30=Q