Possiblity of dual lan sharing

I have 4 computers on 2 separate wifi’s I want to lan connect. Would it be possible to have computer A(hosting lan share) & B connect to computer C (hosting lan share) & D or would C & D each need to connect to A? Possibly annoying question but I’m looking at this service as a way to play lan games over 2 households.