Josh Allen threw for 304 yards and James Cook tallied 89 rushing yards and a score as the Buffalo Bills handled the Miami Dolphins 26-9.