It depends on how you are defining the zone. Let's assume 3D and say the zone is a box shaped area.
The dimensions are from the lower left corner to the upper right corner assuming +Z is forward. Let's say the box is 40 units on Z, 20 units on X and 10 units on Y. We'll say group A is the lower left, and Group B is the upper right:
A has coordinates (0,-5,10)
B has coordinates (20,5,50)
Now the zone is defined. We check if the character is within the trigger zone. Here's some pseudo code:
result=false
If character X > 0 and character X < 20
If character Y > -5 and character Y < 5
If character Z > 10 and character Z < 50
result=true
startlaughing=true
endif
endif
endif
if startlaughing=true
if sound playing LAUGHTER = false
play sound laughter
endif
endif
if result=false
startlaughing=false
endif
The code will check if the character is in the zone. If they are, the laughter will try and play while they are there. If the laughter is playing, it won't start again until the sound has played completely.
When they leave the area, the laughter will finish it's current sequence and stop.
Enjoy your day.