first of all we need the resolve the diagonal force into its horizontal and vertical components. Using trigonometry you can deduce that the horizontal component equates to 8Cos30 and the vertical component equates to 8Sin30. Next we resolve the forces in either the horizontal direction giving us F = Q - 8Cos30 and since the particle is in equilibrium F = 0 therefor we can find Q = 8Cos30. Last we solve the vertical direction giving us F = 5 + 8Sin30 - P and again the particle is in equilibrium therefor F = 0 so we can deduce that P = 5+8Sin30.