Black and yellow teams are trying to get the basketball in the goal.
Two teams are playing a sport.
Get the basketball in the goal is playing a sport.
Black and yellow teams is the same as two teams.
"Teams are trying to get the basketball in the goal" implies playing a sport.