I think you should submit the first form then move to the second tab then use the ajax to submit the form in background and then using the jquery swtich to the second tab.
Step1: submit first form. (In callback Move to second tab using JQUERY) Setp2: Submit second form, it will not affect first one.