Given three circles of radius $R$, which touch only at one point and there centers belong to $OD$. The line $OC$ is tangent to $(M, R)$ and intersects $(K,R)$ at $O$. Find the length of $AB$ in terms of $R$.

I attempted to solve it as follows:
$OC^2=(OD-2R)^2\cdot OD^2$
$MO^2+MC^2=OC^2$
$OA\cdot (OA+AB)=(OD-4R)^2+(OD-2R)^2$
I then attempted to combine the equations above, but they didn't give anything useful. Could you please explain to me how to solve the question?

Drop $LP \perp AB$ with $P$ on $AB$. Then $\triangle OPL \sim \triangle OCM $ with similarity ratio $3/5$. Why?
Then $LPA$ is a $3-4-5$ right triangle whence $AB=8R/5$.
(Intermediate steps are left for the reader.)