To relate the Wilson Score with the standard approach for creating a confidence interval for p seen above, note that
\begin{equation*}
\big | p - \tilde{p} \big | = z_{\alpha /2} \sqrt{\frac{p(1-p)}{n}}
\end{equation*}
can be simplified by squaring both sides to get
\begin{equation*}
\big ( p - \tilde{p} \big )^2 = z_{\alpha /2}^2 \frac{p(1-p)}{n}.
\end{equation*}
Replacing \(\tilde{p}\) with the relative frequency gives
\begin{equation*}
\big ( p - \frac{Y}{n} \big )^2 = z_{\alpha /2}^2 \frac{p(1-p)}{n}
\end{equation*}
or by simplifying
\begin{equation*}
(n+z_{\alpha /2}^2 )p^2 - (2Y+z_{\alpha /2}^2) p + \frac{Y^2}{2} = 0.
\end{equation*}
Solving for p using the quadratic formula and simplifying ultimately results in the described interval.