How is this not just a straight forward math problem? Work it out:
You say the thermal resistance from junction to case is 4°C/W, and that the junction is producing 10 W of heat. It will therefore be 40° hotter than the case. The max allowed junction temperature is 150°C, so the max allowed case temperature is 110°C.
You say the worst case ambient temperature is 50°C, so that means 10 W of heat flow from the case to ambient can't drop more than 60°C. Overall the case to ambient path must have (60°C)/(10 W) = 6°C/W thermal resistance or less.
Of course in practise you'd want to make sure the case to ambient resistance is some margin below the absolute maximum of 6°C/W.