If they are "beyond the defense" now, then "legally online when it happened" has to refer to a previous time when neither were beyond the defense. And the second pass is when you want an attacking player to be allowed to pass to a teammate who is in front of him, with only one (or no) defender between him and the goal. Your justification for this would be "the passer only has one (or no) defender between him and the goal as well".
So, with Z being the keeper (and the goal at the top of the diagram), and Y a defender, A the attacking passer, and B the receiving attacker, you want this position at the point of the pass from A to be offside, as it is already:
________________Z
________B
_____________Y
___________________A
but this to be allowed, with the defender further away from the goal:
________________Z
________B
___________________A
_____________Y
and your justification for that is "at some earlier time, Y was between both A and B and the goal". So as well as the pass from A to B, this previous time needs to be defined, and noted by the officials. A nightmare to sort out (even if you are able to construct a workable definition), and because you think a one-on-one attacker-goalie situation is not exciting enough.