I am so confused, could you explain a bit more in detail?
If you mean all connected to a router, then yes you can.
If you mean have 2 pcs connected to each other, then have another connected via Wi-Fi (which I'm guessing is going to be using the onboard Wi-Fi on one of the PCs) then you will have a couple of issues.
Before I can answer anything, if you could please explain more in-depth that would help a lot.