Mexico need only a point against Sweden to qualify and finish top. They will go through, irrespective of their own result, if Germany fail to beat South Korea.
Sweden are guaranteed to qualify if they better Germany's result. They will top the group if they beat Mexico and better Germany's result.
If both Germany and Sweden draw their games, then the team in the higher-scoring game will finish second. If the matches finish with the same score, then Germany will finish second because they beat Sweden.
South Korea can qualify if they beat Germany and Sweden lose, and finish with a better goal difference than those two teams.