I would define the a.s. order $a_n\stackrel{a.s.}{=}O(b_n)$ as $P(a_n=O(b_n))=1$, equivalently
$$P\left[\limsup_{n\to\infty}\left|\frac{a_n}{b_n}\right|<\infty\right]=1,$$
equivalently, for almost every $\omega$ there exist finite $M_{\omega}$ and $N_{\omega}$ such that $|a_n/b_n|<M_{\omega}$ for all $n>N_\omega$.
To prove the claim, given that you don't specify anything about the structure of the sequence over $n$ (eg, not independent), we probably need to use something like the Borel-Cantelli lemma to go from probability statements for a single $n$ to statements for the whole sequence. [There aren't that many other ways to do it, and if it is something else it will take more work than I have time for right now]
We'll need to replace $x$ by an increasing sequence $x_n$. An obvious sequence to try is $x_n=\log n$, which puts us right at the boundary of $O(n^{-1/2}\log n)$. I'm going to write $g_n(x) = n^{-1/2}(x+12\log n)$ because it's less annoying.
Substituting in, we get
$$P(Z_n>g(x_n))<\exp(-x_n/6)=\exp(-(\log n)/6)=n^{-1/6}$$
That's not very helpful: the sum of those exceedance probabilities is infinite. But we could try $A\log n$ for some fixed $A$
$$P(Z_n>g(x_n))<\exp(-x_n/6)=\exp(-(A\log n)/6)=n^{-A/6}$$
If $A=12$, the exceedance probability is $n^{-2}$ and
$$\sum_n P(Z_n>g(x_n))<\sum_n n^{-2}<\infty$$
so $P(Z_n>g(x_n)\textrm{ i.o.})=0$ by the Borel-Cantelli lemma. Does that help?
$$P(Z_n>g(x_n))= P(Z_n> n^{-1/2}(x_n+12\log n))=P(Z_n> n^{-1/2}(12\log n+12\log n))$$
And if
$$P(Z_n> n^{-1/2}(24\log n)\textrm{ i.o.})=0$$
then
$$P\left( Z_n=O(24n^{-1/2}\log n) \right)=1$$
and we are done.
Well, almost done. You'd normally want a matching lower bound for order notation, so
- $Z_n$ are non-negative
- An equivalent bound applies to $-Z_n$
- The author is using $O()$ notation in a non-symmetric way
- or something is wrong.