Assumptions: llamas gets all possible luck, including flinching, minimum rolls, dodging any non-100% accurate moves, critting, and never missing. To emulate llamas getting every prediction correct, I worked under the assumption that llamas makes a play after knowing what Mael's play is (and Mael cannot change it, naturally).
atomicllamas's win scenario: Remove Flygon, sweep with Medicham's Zen Headbutt flinching through Alomomola.
Mael's win scenario: Kill Medicham with either Venusaur or Emboar alive (Emboar is optimal, as Durant cannot revenge if lastmon). If Durant is still alive, needs one more Pokemon to stall a burn turn. Alternatively, weaken Tangrowth into Flygon kill range (or kill Tangrowth) and preserve Flygon.
Relevant numbers and calculations
Mael team: Alomomola (436/501 HP, 87%) / Emboar (168/361 HP, 46.5%) / Venusaur (234/301 HP, 77.7%) / Mawile (68/304 HP, 22.4%, BRN) / Flygon (283/301 HP, 94%)
atomicllamas team: Durant (92/257 HP, 35.7% HP, BRN) / Tangrowth (235/395 HP pre-Regen, 59.5%, TOX) / Medicham (229/261 HP, 87.75%)
252 Atk Flygon U-turn vs. 0 HP / 0 Def Medicham: 81-96 (31 - 36.7%) -- 72.5% chance to 3HKO
252 Atk Flygon Outrage vs. 0 HP / 0 Def Medicham: 208-246 (79.6 - 94.2%) -- guaranteed 2HKO
252 Atk Flygon Outrage vs. 216 HP / 44+ Def Tangrowth: 118-141 (29.8 - 35.6%) -- 31.7% chance to 3HKO
252 Atk Flygon U-turn vs. 216 HP / 44+ Def Tangrowth: 92-110 (23.2 - 27.8%) -- 77.1% chance to 4HKO
252 Atk Reckless Emboar Flare Blitz vs. 216 HP / 44+ Def Tangrowth: 330-390 (83.5 - 98.7%) -- guaranteed 2HKO
252 Atk Reckless Emboar Flare Blitz vs. 0 HP / 0 Def Medicham: 288-339 (110.3 - 129.8%) -- guaranteed OHKO
252 Atk Emboar Sucker Punch vs. 0 HP / 0 Def Medicham: 107-126 (40.9 - 48.2%) -- guaranteed 3HKO
0 SpA Alomomola Scald vs. 0 HP / 0 SpD Medicham: 54-64 (20.6 - 24.5%) -- guaranteed 5HKO
0 SpA Alomomola Scald vs. 216 HP / 0 SpD Tangrowth: 37-44 (9.3 - 11.1%) -- possible 9HKO
252 SpA Life Orb Venusaur Sludge Bomb vs. 216 HP / 0 SpD Tangrowth: 554-655 (140.2 - 165.8%) -- guaranteed OHKO
232 SpA Life Orb Tangrowth Ancient Power vs. 120 HP / 252+ SpD Alomomola on a critical hit: 129-152 (25.7 - 30.3%) -- 0.6% chance to 4HKO after Leftovers recovery
Turn 25: Mael Scalds, llamas switches into Tangrowth.
Mael's best play on turn 25 is to Scald because Alomomola will easily live a burned crit Superpower (does 40.9% on a max roll). Scald will kill Durant, will push Medicham into "can only tank one U-turn before it dies to another" range, and whittles Tangrowth. Alomomola's health is not relevant because it's going to get flinched to death regardless of HP remaining, and it cannot pass a Wish because llamas will crit the recipient to death with ZHB (it only matters with Flygon).
After knowing that Mael will Scald, llamas will switch into Tangrowth for the same reasons explained above.
alternate options
atomicllamas can sacrifice Durant on Turn 25 instead of going to Tangrowth. This is a poor play because it removes Durant as a U-turn/Flare Blitz switch-in for 9% of Tangrowth's health, and directly leads to a loss. After Durant dies, llamas will go Medicham (going to Tangrowth would completely invalidate sacrificing Durant, and: see Turn 27 for the aftermath of killing Alomomola with Tangrowth but pretend that Durant isn't there anymore) and use ZHB to flinch Alomomola to death. Mael will go to Flygon and U-turn, sacrificing Mawile if Medicham stays in or going to Venusaur on a Tangrowth switch (and confirming win). If Medicham then stays in, Mael only needs to U-turn once more, sacrificing Venusaur, before confirming the win between Emboar and Flygon.
atomicllamas can go to Medicham on Turn 25 instead of going to Tangrowth. This is a poor play because he loses 20% of its valuable HP, meaning that once Alomomola is dead from ZHB flinches, Flygon can U-turn. If Medicham stays in, it takes too much damage to be able to tank an Emboar Sucker Punch; if llamas switches to Durant, it dies and the situation is reset with a Mawile sacrifice; if llamas switches to Tangrowth, see Turn 27.
HP: Alomomola gets Leftovers (now at 467/501 HP, 93.2%). Tangrowth gets Regen (to 366/395 HP, 92.7%) then takes SR (to 317/395 HP, 80.3%) then takes TOX t1 damage (to 293/395 HP, 74.2%) then takes minimum roll Scald (to 256/395 HP, 64.8%).
Turn 26: Mael Scalds again, llamas kills with magic 100% accurate Leaf Storm.
Mael wants to force the Tangrowth to get a kill in order to pressure it with Emboar. As in the above, llamas cannot risk switching anything else into Scald. Even if llamas's Tangrowth had Giga Drain (it does not), this is the correct play because Tangrowth will fall into Flare Blitz death range due to LO + TOX t2 damage even from full. Alomomola is faster, so Tangrowth takes another Scald prior to KOing.
alternate options
atomicllamas's Tangrowth carries Ancientpower. It has the option of using Ancientpower and claiming the boost (remember, assuming all luck). Ancientpower crit does 30% maximum to Alomomola, and Tangrowth takes another Scald (~9%), LO damage (10%), and TOX t2 damage (12.5%), leaving it at about 33%. In this instance, Mael will Protect to stall for another turn of Toxic damage (leaving it at about 14.25%), then sacrifice Mawile while Tangrowth dies to TOX + LO. Flygon wins in that scenario.
If atomicllamas switches out on the Protect turn, Tangrowth is in range of being 2HKOed by Flygon Outrage, meaning that Mael only has to force a Durant KO with Emboar to seal the game in the same manner as listed below. If atomicllamas switches out on the Mawile turn, Mawile will have one turn in before dying to burn, so Mael can play accordingly to the Pokemon that is out after the Mawile sack.
HP (Leaf Storm): Alomomola KOed. Tangrowth takes minimum roll Scald (to 219/395 HP, 55.4%), then takes LO damage (to 180/395 HP, 45.6%), then takes TOX t2 damage (to 131/395 HP, 33.1%).
HP (Giga Drain): Alomomola KOed. Tangrowth recovers to full off of Giga Drain (to 395/395 HP, 100%), then takes LO damage (to 356/395 HP, 90.1%), then takes TOX t2 damage (to 307/395 HP, 77.7%). It is still clearly in KO range of Emboar Flare Blitz, and Emboar will not die to recoil after SR if it Flare Blitzes Tangrowth at this HP range. This is a hypothetical scenario anyway, but proves that staying in to Scald is still Mael's best play even when Giga Drain is an unknown.
Turn 27: Mael sends in Emboar and clicks Flare Blitz. llamas will sacrifice Durant to FB.
Mael forces Tangrowth to get a kill, and can therefore force atomicllamas to sacrifice Durant. atomicllamas cannot stay in and die to the Flare Blitz because Outrage from Flygon will outspeed and KO Medicham (it can U-turn -> sack Mawile to ensure that it is in Outrage range after SR) and Durant. atomicllamas cannot sacrifice Medicham because recoil will not KO Emboar, and subsequent turns lead to a simple victory for Mael (FB if Tang comes in, Sucker if Durant does). Sacrificing Durant is the only play that does not instantly confirm a loss to either Emboar or Flygon.
HP: Tangrowth will have Regenerator when it comes in next. Durant takes SR on switch-in (to 60/257 HP, 23.3%). Emboar takes SR on switch-in (to 123/361 HP, 34%), then takes 33% recoil damage from Flare Blitz (to 103/361 HP, 28.5%), then gets Leftovers (to 125/361 HP, 34.6%).
Turn 28: atomicllamas sends in Medicham. Mael clicks Sucker Punch, and atomicllamas clicks Zen Headbutt.
atomicllamas must go Medicham, because Emboar can simply Flare Blitz again if Tangrowth comes back in. If atomicllamas tries to go to Tangrowth on the Sucker Punch, Mael will click Flare Blitz the next turn and get a kill (confirming a win with either Flygon or Venusaur). If atomicllamas selects Trick on this turn, Mael's Emboar gets to re-select a new move (Flare Blitz) and now outspeeds Medicham, again confirming a win via Flygon or Venusaur.
HP: Medicham takes SR damage (to 197/261 HP, 75.4%) and minimum roll Sucker Punch damage (to 90/261 HP, 34.4%). Emboar KOed.
Turn 29: Mael sends in Flygon and clicks Outrage.
atomicllamas is out of options because min roll Outrage will 2HKO Tangrowth after rocks + TOX damage. Outrage will also OHKO Medicham, and Venusaur can clean up Tangrowth. If atomicllamas switches in Tangrowth and goes back out to sacrifice Medicham to attempt to play for confusion damage, Venusaur will clean. Game over.
HP: If Tangrowth comes in, Regenerator brings it up to 262/395 HP, 66.3%. It takes SR damage on the switch-in (to 213/395 HP, 53.9%), then takes the minimum roll Outrage (to 95/395 HP, 24%). It will die to the next minimum roll Outrage.