First off: Please share what you have tried so far.
Second: You can do this in a number of ways. The easiest is just to use a
<form>
<t:if test="showFirstForm">
....your 1st form content ....
<p:else>
....your 2nd form content ....
<p:else>
</t:if>
</form>
You might also like to have a look at the FormFragment for ajax controlled dynamic form content using triggers to redraw.