Why is Ralph able to reassert leadership when rescue comes?
Ralph is able to reassert leadership in the face of the naval officer, because he understands that Jack's power as a leader is bound by his savagery. Jack is not going to be able to assert his power in front of Ralph or the naval officer in the way that he usually would on the island, and certainly not by showing a "stick sharpened at both ends."
The naval officer embodies the morals and laws of civilization and good English behavior; he certainly is not going to pay heed or even allow Jack to act like a savage toward Ralph or any of the other boys. Ralph can easily reclaim leadership because he now has the backing and support of the naval officer and the adult world.