use the area2D body_entered signal, when both players are inside the area set two vars to true when both are true change scene
var player_1_inside_area = false
var player_2_inside_area = false
func _physics_process(delta):
if player_1_inside_area and player_2_inside_area:
change_scene()
func _on_Area2D_body_entered(body):
if body.is_in_group("player_1"):
player_1_inside_area = true
elif body.is_in_group("player_2"):
player_2_inside_area = true
and i think you could also use setget to check for the vars value change instead of checking them on process every frame.