Before proceeding with the details of the argument, let's pause to get the general idea behind the proof. We choose integers \(n\) and \(s\) with \(n>s\), and it will eventually be clear how large they need to be in terms of \(g\) and \(t\). We will then consider a random graph on vertex set \(\{1,2,\dots,n\}\), and just as before, for each \(i\) and \(j\) with \(1\le i\lt j\le n\), the probability that the pair \(ij\) is an edge is \(p\), but now \(p\) will depend on \(n\). Of course, the probability that any given pair is an edge is completely independent of all other pairs.
Our first goal is to choose the values of \(n\), \(s\) and \(p\) so that with high probability, a random graph does not have an independent set of size \(s\). You might think as a second goal, we would try to get a random graph without small cycles. But this goal is too restrictive. Instead, we just try to get a graph in which there are relatively few small cycles. In fact, we want the number of small cycles to be less than \(n/2\). Then we will remove one vertex from each small cycles, resulting in a graph with at least \(n/2\) vertices, having no small cycles and no independent set of size \(s\). The chromatic number of this graph is at least \(n/2s\), so we will want to have the inequality \(n>2st\).
Now for some details. Let \(X_1\) be the random variable that counts the number of \(s\)-element independent sets. Then
\begin{equation*}
E(X_1)=\binom{n}{s}(1-p)^{C(s,2)}
\end{equation*}
Now we want \(E(X_1)\lt 1/4\). Since \(C(n,s)\le n^s=e^{s\ln n}\) and \((1-p)^{C(s,2)}\le e^{-ps^2/2}\), it suffices to set \(s=2\ln n/p\). By Markov's Inequality, the probability that \(X_1\) exceeds \(1/2\ge 2E(X_1)\) is less than \(1/2\).
Now let \(X_2\) count the number of cycles in \(G\) of size at most \(g\). Then
\begin{equation*}
E(X_2)\le \sum_{i=3}^g n(n-1)(n-2)\dots(n-i+1) p^i\le g(pn)^g.
\end{equation*}
Now, we want \(E(X_2)\le n/4\), and an easy calculation shows that \(g(np)^g\le n/4\) when \(p=n^{1/g-1}/10\). Again by Markov's Inequality, the probability that \(X_2\) exceeds \(n/2\ge 2E(X_2)\) is less than \(1/2\).
We conclude that there is a graph \(G\) for which \(X_1=0\) and \(X_2\le n/2\). Remove a vertex from each of the small cycles in \(G\) and let \(H\) be the graph that remains. Clearly, \(H\) has at least \(n/2\) vertices, no cycle of size at most \(g\) and no independent set of size \(s\). Finally, the inequality \(n>2st\) requires \(n^{1/g}/(40\ln n)>t\).