NN and the Optical Illusion

From Codeforces. Tangent circles. Solve the geometry problem "NN and the Optical Illusion".

Examples
Input: [3,1]
Output: 6.464101615137752
Hints

NN and the Optical Illusion

**From Codeforces.** Tangent circles. Solve the geometry problem "NN and the Optical Illusion".