First, please don’t factory reset them again, this is almost always a bad idea.
Try wiring one to the router with an Ethernet cable, and use the controller to get it set up. Depending on whether you have other speakers, this could be an ‘add a device’ process, or a ‘set up a new system’ process. Once you have the one set up, keep it wired to the router, and use the ‘add a device’ process to add the second Five (for what it’s worth, there are two generations of the PLAY:5, but one generation of the Five).
Because you’ve factory reset them, unless you’re adding them back to other speakers in a Sonos system, you’ll have erased all stored settings.