First of all. If all this is on your local network, without any NAT gateways or similar - it's no big deal. Your server will see your clients with different IP addresses, and the clients can connect directly to each other.
On the other hand, if your server runs on an internet reachable IP address, and your clients connect from wherever they can reach that server you will have to consider the rest of this post.
Client A connects to your server. There's now a connection between:
(ClientAIP:ClientAPort,ServerIP:ServerPort)
Client B connects to to your server. There's now a connection between:
(ClientBIP:ClientBPort,ServerIP:ServerPort)
If both your clients are behind the same NAT'ed gatway, the server will see ClientAIP == ClientBIP.
But ClientAPort will be different from ClientBPort. And that's enough to to keeep up two connections to your server.
Now the trouble comes if you want to pair two of them. Have the clients send you its internal IP address(And perhaps its internal port too so that could be used for extra verification.)
You now know the clients (external) IP and their internal IP.
These will be the scenarios:
ClientAInternalIP == ClientAIP, ClientBinternalIP == ClientBIP. Great neither are behind a NAT gateway - select one of them to be a server and the other one to connect directly to it.
ClientAInternalIP != ClientAIP, ClientBinternalIP == ClientBIP. ClientA is behind NAT, ClientB is not. Have ClientB be a server and ClientA connect diectly to ClientB
ClientAInternalIP == ClientAIP, ClientBinternalIP != ClientBIP. Just the reverse case 2).
ClientAInternalIP != ClientAIP, ClientBinternalIP != ClientBIP, but ClientAIP == ClientBIP . Special case - they're both behind a NAT gateway but they're on the same internal network. This is the same as case 1). Except the clients can communicate on their internal network instead of the internet.
ClientAInternalIP != ClientAIP, ClientBinternalIP != ClientBIP. Both are behind NAT gatways. -You can't have the connect to eachother - atleast not without asking someone to set up port forwarding on one of the gateways at the client. You'll have to route the communication through your server. (Though there are routers/gateways providing APIs you might be able to use to programatically open port forwarding from a client site. It's not widely available and probably locked down anyways).
And even with the above scenarios there might be firewalls set up so clients can't peer directly even if their real IP address is routable on the internet - you might need to fall back to routing through your server anyway.