Working from first principles of reasoning.
You want 26tpi, that is finer than your 12 tpi leadscrew so you know you want ‘speed up’ gearing. The ratio is 26/12 that is > 1 so will speed up if the bigger gear is on the spindle(mandrel) and the smaller one on the leadscrew.
Lets factor that : 2×13/2×6. Remove the common ‘2’ from top and bottom to give 13/6. Oh dear we’ve got a bigish prime but no worry.
We know we have only got gears in steps of 5 so numbers ending in 0 or 5 ie 20, 25, 30, 35. Start multiplying that awkward 13 until we get a number ending in 0 or 5. First one is 5×13 or 65 and that’s a gear we’ve got. Hooray. Multiply the 6 on the bottom of the equation by 5 as well and we balance our equation:
5×13/5×6 equals 65/30. So we could use 65/30 with some idlers in between if it weren’t for the fixed 40 on the spindle, that would be on the top of the equation.
Ok we can cancel that out by putting the same gear , 40, on the leadscrew ie the bottom of the equation. 40×65/40×30.
But that means we need a 40. What if we don’t have one? Then what we do is adjust the 40 and 30 on the bottom of the equation (because we can’t change the 40 on top as it is permanent) keeping the result 40×30 the same. eg 80×15, or 20×60 or even 25×48 except we don’t have 48.
To get 40×65/20×60 onto the lathe the two on top have to be drivers, and the 40 is on the spindle which is a driver anyway. So the 40 drives the 20 which is keyed to the 65 which drives the 60. Note if the leadscrew ends up going backwards you will need an idler in there to reverse it without changing the ratio.