Notice the swap \(\lambda_i\leftrightarrow a\).
\(\cfrac{a*sin(\theta_i)+\lambda_i}{cos(\theta_i)}=OC=\cfrac{\lambda_r}{tan(\cfrac{1}{2}\theta_r)}\)
\(\cfrac{\lambda_i}{\lambda_r}\cfrac{\cfrac{a}{\lambda_i}*sin(\theta_i)+1}{cos(\theta_i)}=\cfrac{1}{tan(\cfrac{1}{2}\theta_r)}\)
If \(\cfrac{a}{\lambda_i}\approx 1\) ie a torus with a small hole,
\(\cfrac{\lambda_i}{\lambda_r}\cfrac{sin(\theta_i)+1}{cos(\theta_i)}=\cfrac{1}{tan(\cfrac{1}{2}\theta_r)}\)