You can determine which panel to display by using the defaultTab option passed into the constructor for the panel. Take a look at the code on the Spry Tabbed Panels sample page, in particular the first example. You'll see this as the constructor:
var tp1 = new Spry.Widget.TabbedPanels("tp1", { defaultTab: 2 });
The first tab is tab 0 (zero), so setting defaultTab to 2 causes tab 3 to be shown by default. So for your example, you'd need to set the default tab to 4 (fifth tab) to make your form page display. In PHP it could be as simple as:
var tp1 = new Spry.Widget.TabbedPanels("tp1", { defaultTab: <?php echo($tabToShow); ?> });
You'd have a default value for $tabToShow set to 0 (zero) and if the form submit doesn't pass validation, then you'd set $tabToShow to 4.