The pressure inside a soap bubble is given by the formula:
\[
P = P_0 + \frac{4T}{R},
\]
where \( T \) is the surface tension and \( R \) is the radius of the bubble.
Step 1: For the two bubbles with radii \( a \) and \( b \), the pressures are:
\[
P_1 = P_0 + \frac{4T}{a}, \quad P_2 = P_0 + \frac{4T}{b}.
\]
Step 2: The pressure difference across the common surface is:
\[
P_1 - P_2 = \frac{4T}{R}.
\]
Step 3: Substitute the expressions for \( P_1 \) and \( P_2 \):
\[
\frac{4T}{a} - \frac{4T}{b} = \frac{4T}{R}.
\]
Step 4: Simplify:
\[
\frac{1}{a} - \frac{1}{b} = \frac{1}{R}.
\]
Step 5: Solve for \( R \):
\[
\frac{1}{R} = \frac{b - a}{ab}, \quad R = \frac{ab}{b - a}.
\]
Final Answer:
\[
\boxed{\frac{ab}{b - a}}.
\]