2005 Ford Explorer issues?

Hello I've been having some issues with my 2005 ford explorer and the PATS system and causing my car not to start so yesterday I went and checked my battery cables disconnected both of them and waited about 5 minutes and reconnected them and tried to start the car the first attempt it didn't start but the second attempt it started right up with no problem please help what issue could this be…

Before you do anything else or spend any money, try a different key. These are transponder keys and they can go bad. If the other key works better, then you may get away with just replacing one key. If that doesn't work, chances are you've got a bad transceiver. That's the gizmo that surrounds the lock cylinder and sends a signal to the key to activate the transponder and receive the key signal back from it. The transceivers fail too.