Auto-translated
It's quite simple: capture the demon city, gather resources, and build one building per day. Once you've amassed enough strength, strike at the nearest city (it's located east of the dungeon entrance; follow the road – you can't miss it). Then, gather your forces again, exit the dungeon through the southeastern passage (enemies will also come through it, so build fortifications in the city and, immediately after capturing the first Rampart, head there to crush the enemies). Another city is located southeast of the first Rampart, but the path to it is guarded by druids. You can try to fight your way through them, but it's better to go around (the path from the second city initially leads downwards, then turns west... I don't remember the exact route). Once you've captured all three cities, recruit 100 archers, head north through the dungeon, give them to the dragons (you can simply defeat the dragons, but there are many of them), and prepare for a serious battle. The enemy will be holed up in a city with a large army.
P.S. It's best to perform all of the above actions with demonic troops – the elves will desert from Agramil's command. When you reach the last city, create new heroes in the Ramparts, give them troops, bring the heroes to Agramil, give him the troops, and attack immediately.