Here's the math: The O's with 2 more wins get to 87. Detroit at best can only get 87, so that's a tie. (Minnesota is irrelevant in this, I'll explain in a bit). The O's and Tigers would split the season series 3-3, again a tie. 2nd tiebreaker is intradivision record. At worse the O's go 30-22, at best the Tigers 30-22, again a tie. 3rd tiebreaker is interdivision record. With 2 wins against Detroit, the worst the O's could do is 37-27. The Tigers at best, 35-29, giving the O's that tiebreaker.
Why Minnesota is irrelevant: If the Twins finish ahead of Detroit, obviously they are in and that doesn't matter. If the Twins finished at 87 wins as well however, the O's have THAT tiebreaker as well. The O's swept Minnesota earlier, so the best Minnesota could do next weekend is tie. Minnesota has already lost 23 games in their division, the O's at worse lose 22, again giving that tiebreaker to the O's.