The Community code formating is a good balance between displaying code and being able to copy-paste it without errors into Mathematica or Wolfram Cloud notebook. For most of the cases Community code formating here does a good job. For the cases when more math-like formating is needed we recommend also (in-addition) using an image, as you did yourself. Or you can use MathJax and TeXForm and symbol $
:
TeXForm[(-1)^k/Sqrt[1.5^k] Sin[(-1)^k Sqrt[1.5^k] t]]
\frac{(-1)^k \sin \left((-1)^k \sqrt{1.5^k} t\right)}{\sqrt{1.5^k}}
so using the above TeX between $ you get:
$$\frac{(-1)^k \sin \left((-1)^k \sqrt{1.5^k} t\right)}{\sqrt{1.5^k}}$$
More detailed information is in the tutorial that is linked from the top of main page:
READ FIRST: How to post and use Wolfram Community