Let the slower bee is called $A$, while the faster bee is called $B$. Let the whole distance is $X$. And let they first meet after time $t$.
This means that for time $t$ both bees together travel distance $X$. It's given $A$ has traveled $50m$ for time $t$. Both bees cover distance of $2X$ from the time they meet for the first time to the time they meet for the second time. This means that $A$ traveled $100m$ and it's also given that $A$ is at distance $20m$ from the other hive. Thus $100 = (X-50) + 20$.
Thus $X=130$.