I'd go with a simple tabular
.
\documentclass{article}\usepackage[dvipsnames]{xcolor}\usepackage{amsmath}\usepackage{array,hhline}\NewDocumentEnvironment{explanation}{O{0.3}m} {% \par\addvspace{\topsep}\noindent \begin{tabular}{ p{\dimeval{#1\columnwidth-2\tabcolsep-\arrayrulewidth/2}} | p{\dimeval{\columnwidth-#1\columnwidth-2\tabcolsep-\arrayrulewidth/2}} } \hline \raggedleft\textcolor{Turquoise}{#2} &}{% \tabularnewline \hhline{~|-} \end{tabular}\par \addvspace{\topsep}}\begin{document}\begin{explanation}{Test Procedure for a Single Mean (Variance Known)}Some text before the display\[z=\frac{a}{b} \text{ or } z=\frac{x}{y}\]some text follows some text follows some text followssome text follows some text follows some text followssome text follows some text follows some text followssome text follows some text follows some text follows\end{explanation}\begin{explanation}[0.25]{Test Procedure for a Single Mean (Variance Known)}\noindent\[z=\frac{a}{b} \text{ or } z=\frac{x}{y}\]some text follows some text follows some text followssome text follows some text follows some text followssome text follows some text follows some text followssome text follows some text follows some text follows\end{explanation}\end{document}
Note \noindent\[
if you really want to start a paragraph with a math display.