You would have two capacitors in series. The resulting capacitance, from high school physics, is 13MF. I assume you are doing this to increase the voltage rating of the capacitors by bridging them. As a rule of thumb, the maximum voltage to apply across bridged capacitors is 40% of the combined ratings (40% of 950V) or about 650V to play it safe.

To figure the balance resistors, you need to know the leakage current from each cap. Or, to calculate this leakage current, a good approximation to use is 1/2 * SQRT(CV) for each cap. Then, yet another rule of thumb, take the leakage current and multiply by 10 to get the balancing current. Now it's just simple Ohm's law.

To do the math: cap40/400 = 0.063ma, cap20/500 = 0.05ma

Total of both x 10 = 1.13ma

Applying 650Vmax: 650V/1.13ma= 575K Ohms

Since you need one R across each cap: 575/2 = 288K Ohms, so you'll need a pair of 300K Ohm resistors that are rated for 1W.

Just be mindful that old capacitors leak more, which can throw the above way off and require more than 10x for the balance resistors (which will increase the R's power rating).

And, as a final rule of thumb, it's not a good idea to bridge capacitors of different ratings or types to go for a higher voltage rating.

To figure the balance resistors, you need to know the leakage current from each cap. Or, to calculate this leakage current, a good approximation to use is 1/2 * SQRT(CV) for each cap. Then, yet another rule of thumb, take the leakage current and multiply by 10 to get the balancing current. Now it's just simple Ohm's law.

To do the math: cap40/400 = 0.063ma, cap20/500 = 0.05ma

Total of both x 10 = 1.13ma

Applying 650Vmax: 650V/1.13ma= 575K Ohms

Since you need one R across each cap: 575/2 = 288K Ohms, so you'll need a pair of 300K Ohm resistors that are rated for 1W.

Just be mindful that old capacitors leak more, which can throw the above way off and require more than 10x for the balance resistors (which will increase the R's power rating).

And, as a final rule of thumb, it's not a good idea to bridge capacitors of different ratings or types to go for a higher voltage rating.