This is a bit involved so quite a long video. In summary, if your stance and / or area of intended swing is interfered with by more than one condition from which you could get free relief you may choose which condition you take relief from first. This decision can lead to very different places from which to play your next stroke.
Watch the video below:
Many players would (mistakenly) find the nearest point of complete relief from both conditions. You may not do this under the rules unless you have already taken complete relief from each condition in turn and essentially ended up back where you started. This does get complicated, so if you have access to a referee I suggest you ask for help!
Also remember that unless the area has been defined as a No Play Zone, it is your decision whether you take relief – you might be happy to play the ball as it lies if your relief option (with total relief) moves you to a worse area.
Even if one of the conditions is a No Play Zone you may still drop into that No Play Zone when taking relief from the other condition. But you would then have to take relief from this No Play Zone.