Let's say I have a cube on a plane (plane 1), and a light in the sky with a plane (plane 2) beneath it that casts a shadow across half of the cube. What I want to do is have the shadow from the cube cast on plane 1, and the shadow from plane 2 cast on the cube WITHOUT casting on plane 1.
In a light's Project settings you can choose which objects you wish to exclude (or include, whichever is easier) from its illumination and shadows (if they're enabled). If I understand your situation correctly you will need to have two lights (co-located if you like) - one illuminating the cube and casting a shadow on plane 1 (you can exclude plane 2 from its illumination if you want, but you didn't specify that), and the second illuminating plane 2 and casting a shadow onto the cube but with plane 1 excluded in its Project settings. In any case, work out which objects you wish to include or exclude from each lights illumination and shadow casting.
(My old brain almost melted trying to work this out, as simple as it first seems. I hope I got it right.)