These things are easier if done stepwise. Let's represent "x knows y" as $x\,K\,y$, and let's abbreviate "Alma" as $a$. Now we'll handle "x knows everyone Alma knows". That's the same as saying "if Alma knows y, x knows y", which we can write as$$
\forall y\: (a\,K\, y) \rightarrow (x\,K\,y).
Then we look at the second part "Anyone who ... knows Alma", where "..." stands for the first part, and is assumed to be some statement about this "anyone". We'll abbreviate that statement as $\varphi(x)$, and get $$
\forall x\: \varphi(x) \rightarrow (x\,K\,a)
Now you just have to plug the first part in for $\varphi(x)$ to get $$
\forall x\: \left(\forall y\: (a\,K\, y) \rightarrow (x\,K\,y)\right) \rightarrow (x\,K\,a)
Note $\forall$ is assumed to have low precedence here, i.e. $\forall x\: \alpha\rightarrow \beta$ is to be read as $\forall x\: \left(\alpha \rightarrow \beta\right)$, not as $\left(\forall x\: \alpha\right)\rightarrow \beta$.