I think they way you approach this one is to calculate the odds of the AK improving and subtract the odds that the 22 improves. Both the AK and the 22 have the same likelihood of hitting the flush so that cancels out. The AK will improve to a pair 62.5% by the river.
(6/50)+(6/49)+(6/48)+(6/47)+(6/46)= .625543

The 22 will make trips 20.8% of the time if it goes to the river.
(2/50)+(2/49)+(2/48)+(2/47)+(2/46)=.208514

If you subtract chances of catching trips on the 2's from the chances of spiking a pair on the AK you get 41.7 %. Excluding a straight, your AK will win 41.7% of the time. That means 58.3%, (100- 41.7), of the time the twos will hold up (Excluding a Straight). The AK will make a straight slightly more often than the 2's. I would have trouble doing that math as you would have to calculate the odds of every possible scenario of getting that straight. Like flopping three to the straight and catching a runner runner. Or flopping four to the straight and catching the fifth card on the turn or river ect. Maybe someone here can show a simpler way to run the numbers on the straights. Then of course if your AK is suited, you have a slight advantage of making that flush as well. This should get you started in the right direction.