Applied pure trig question

A belt ABCDEFA of length L passes round two wheels, centres O_1 and O_2. The parts ABC and DEF of the belts are in contact with the wheels and parts AF and CD are straight. If O_1A = a and O_2F = 3a and the angle AO_1B = theta radians show that:

4atan (theta) = 4a(theta) + L - 6a*pi

Next, find the shortest length belt in terms of a.

Im pretty stuck on this one. Any ideas??

I am looking at the equation to see what its saying but can't see where tan(theta) comes from - Obviously a triangle is drawn and the Opposite and Adjacent sides are used some how.

The arc AC on the small wheel is 2a(2*pi - (theta)) but I'm just kinda stuck