You need to add an insert record server behavior for each table you wish to insert to.
The first one should insert to the teams table. In the session variable section, select the ID column for the teams table, this will save the inserted records ID to the session variable. Make sure to leave the redirect after insert option blank.
The second one will insert to the teamname table. Bind the team_id to the session variable created by the first insert record server behavior.
If you are still having a problem, make sure you are not testing using IE, IE sometimes will not post the real error that is occurring.