You’ll want
md`${tex`y = 5^{2x}`}`
See e.g. this page https://www.overleaf.com/learn/latex/Subscripts_and_superscripts