Here's your Group A and B scenarios.
Group B:
Netherlands are 1st with a win or tie, 2nd with a loss.
Chile are 1st with a win, 2nd with a tie or loss.
Spain will come in last if they lose or tie against the Socceroos.
Group A:
Cameroon - are out of it and will be looking for players, on their own and other team, officials, and ball boys to punch and or head-butt all game.
Croatia - make it through with:
1) a win vs Mexico,
or 2) a tie and a Brazil loss (they will win the tie-breaker on superior goal differential)
Mexico - make it through with:
1) a win or tie vs Croatia.
or 2) a loss and a Brazil loss where Brazil's margin of defeat is 2 or more goals greater than Mexico's margin of defeat
or 3) a loss and a Brazil loss where Brazil's margin of defeat is 1 goal greater than Mexico's margin of defeat and Mexico outscores Brazil by at least 3 goals.
Brazil - make it through with:
1) a win or tie vs Cameroon
or 2) a loss and Croatia loss or tie
or 3) a loss and Mexico loss and Brazil's margin of defeat is the same or less than Mexico's margin of defeat
or 4) a loss and Mexico loss and Brazil's margin of defeat is 1 goal greater than Mexico's margin of defeat and Mexico fails to outscore Brazil by at least 3.
1st Place:
Croatia get top with a win and a Brazil tie or loss
Mexico get top with:
1) a win and a Brazil loss or tie
or 2) a tie and a Brazil loss
or 3) a win and a Brazil win and Mexico's margin of victory is 2 or more goals greater than Brazil's margin of victory
or 4) a win and a Brazil win and Mexico's margin of victory is 1 more than Brazil's margin of victory and Mexico outscores Brazil by at least 3.
Brazil get top with:
1) a win and a Mexico loss or tie
or 2) a tie and a Mexico tie
or 3) a win and a Mexico win and Brazil's margin of victory is the same or greater than Mexico's margin of victory
or 4) a win and a Mexico win and Brazil's margin of victory is 1 less than Mexico's margin of victory and Mexico fails to outscore Brazil by at least 3.
So there you go
-QG