Okay, so you can use logic_branch and logic_branch_listener for this.
Create 2 logic_branches: teleport_red_branch and teleport_blu_branch.
Keep the initial values for both of them at 0.
Create a logic_branch_listener and name it teleport_listener.
For logic_branch 01, point at teleport_red_branch. For logic_branch 02, point at teleport_blu_branch.
On the trigger_multiple (or whatever it is you have that causes your teleport to take place, I'm assuming it's trigger_multiple because you mentioned it) that causes your RED teleport, add this output:
My Output Named: OnStartTouchAll
Targets Entities Named: teleport_red_branch
Via this input: SetValue
With a parameter override of: 1
You can optionally check "Fire once only", if you'd like. It doesn't really matter.
Do the same for your BLU teleport, only replace any reference to RED with BLU.
Finally, go to your logic_branch_listener. Add an output:
My Output Named: OnAllTrue
Targets Entites Named: *Your Lava*
Via this input: *Whatever makes your lava go up*
Now, once both teams have taken the teleport, both of your logic_branches will be set to "True" (1), and the game will know it's time to make the lava rise.
Hope this helped!