Right now, Denver is 4-4 in the AFC, Buffalo is 3-6.
The Bills have 3 games left against AFC opponents, and since we must win out, that would make us 6-6 in the AFC.
The Broncos have all 4 games left against AFC opponents. Since they are now 7-5, they would need to go 3-1 to finish 10-6, which would give them a 7-5 AFC record.
So, unfortunately, we would also need Denver to finish at 9-7 to get the last wild card.
Their games are against MIA, at KC, at TEN, and IND. It is possible they could go 2-2 in that stretch, but I'm guessing not likely.
Then again, I've seen stranger things.