From what I'm understanding, you want to target X with the Y visitors? or you to target Y with X traffic?
no matter the order, you can do this in 2 ways:
1. Implement Google Ads Tag on both sites and create a remarketing list with the traffic from site Y and create a campaign in which you send traffic to X.
2. 2 separates accounts, under a MCC and share between accounts the rmk lists that you want to use.
same for facebook