How do you solve this? My algebra 2 teacher taught it to us in class but it still confuses me! Thank you!

[tex]\bf \cfrac{\frac{1}{8}-\frac{1}{2x}}{\frac{1}{12x}-\frac{1}{3x^2}} \begin{array}{llll} \leftarrow \textit{our LCD here will just be }8x\\[0.9em] \leftarrow \textit{our LCD down here will be }12x^2 \end{array}[/tex]
[tex]\bf \cfrac{~~\frac{(x)1-(4)1}{8x}~~}{\frac{(x)1-(4)1}{12x^2}}\implies \cfrac{~~\frac{x-4}{8x}~~}{\frac{x-4}{12x^2}}\implies \cfrac{~~\begin{matrix} x-4 \\[-0.7em]\cline{1-1}\\[-5pt]\end{matrix}~~ }{\underset{2}{~~\begin{matrix} 8x \\[-0.7em]\cline{1-1}\\[-5pt]\end{matrix}~~}}\cdot \cfrac{\stackrel{3x}{~~\begin{matrix} 12x^2 \\[-0.7em]\cline{1-1}\\[-5pt]\end{matrix}~~}}{~~\begin{matrix} x-4 \\[-0.7em]\cline{1-1}\\[-5pt]\end{matrix}~~ }\implies \cfrac{3x}{2}[/tex]