First come, first serve. Whoever hits the button first becomes the Prince.
Then there’s no replacement. This is intentional to discourage Princes from relying too heavily on the fact that they will always be replaced; if they don’t know if there’s a Princess, they can’t rely on it (which avoids encouraging them from revealing D2 - of course, they could also just die N3 or later.)