As Joetjah writed, Player 1 will cause 3 damage per hit (pl_1_dph), and Player 2 will cause (22 - 10) = 12 damage per hit (pl_2_dph).
So, 1 unit of Player 1 requires 100 / 3 ~= 33 hits to kill 1 unit of Player 2 (pl_2_hp / pl_1_dph).
100 units of Player 1 will kill 200 units of Player 2 within
(pl_2_hp * pl_2_units) / (pl_1_dph * pl_1_units) = (100 * 200) / (3 * 100) = 20000 / 300 ~= 66 hits
200 units of Player 2 will kill 100 units of Player 1 within
(pl_1_hp * pl_1_units) / (pl_2_dph * pl_2_units) = (100 * 100) / (12 * 200) = 10000 / 2400 ~= 4 hits
As you see, troops of Player 2 will kill all forces of Player 1 within 4 hits. Within that time, Player 1 also attacked 4 times, and will cause 4 * pl_1_units * pl_1_dph = 4 * 100 * 3 = 1200 damage total, which means, that 1200 / pl_2_hp = 1200 / 100 = 12 units of Player 2 will be killed.
Summary: with 100 units (dph = 3) of Player 1 and 200 units (dph = 12) of Player 2, Player 2 will win within 4 steps (hits) and loose only 12 his units.
Algo:
1) compute damage per hit for player 1 and 2 (dont forget "anti-" bonus)
2) compute minimum hits, required for each player to completely kill enemy army
3) compare required hits to choose the winner (as required_hits)
4) compute damage, caused by looser to winner within required_hits hits to decide, how many forces will loose the winner (all units of looser's army was killed)