Each batter either gets on base or is put out. A player who gets on base either scores, makes an out, or is left on base when the inning ends. Hence each plate appearance will be recorded as an out, a run, or a player left on base:
PA = outs + runs + left on base.
In this game, we know that Casey appeared at the plate four times and was third in the lineup. So Casey, Flynn, and Blake each had four plate appearances, and their six teammates had three apiece. Thus the total number of plate appearances was 30.
There are three outs per inning, so a nine-inning game produces 27 outs. Using the formula above,
30 = 27 + runs + left on base.
Thus the number of runs plus the number of players left on base is 3. But the bases were loaded when Casey came up for the last time, and all three of these players were left on base when he struck out. So Mudville scored no runs in the game.
(Jerry Butters and Jim Henle, “Baseball Retrograde Analysis,” Mathematical Intelligencer 40:4 [December 2018], 71-76.)