please help me with this, I’ve been struggling with it for quite a while.

Answer:
[tex]E=10^{19.5961}[/tex] ergs
Step-by-step explanation:
Given M = 5.2, we can substitute this into the formula and take Log formula into exponential form and solve henceforth.
First, log to exponential >>>>
[tex]Log(x)=y\\Means\\10^y=x[/tex]
Let's put M = 5.2 into the formula and divide by 2/3 to get in log and then change it to exponential form:
[tex]M=\frac{2}{3}Log(\frac{E}{10^{11.8}})\\5.2=\frac{2}{3}Log(\frac{E}{10^{11.8}})\\\frac{5.2}{\frac{2}{3}}=Log(\frac{E}{10^{11.8}})\\7.7961=Log(\frac{E}{10^{11.8}})\\10^{7.7961}=\frac{E}{10^{11.8}}\\[/tex]
Now, we are looking for E, the Energy of the earthquake.
We need to cross multiply and find E. But remember rule of multiplying 2 same bases with different exponents. Its is shown below:
[tex]10^{a}*10^{b}=10^{a+b}[/tex]
So we have:
[tex]10^{7.7961}=\frac{E}{10^{11.8}}\\10^{7.7961}*10^{11.8}=E\\10^{7.7961+11.8}=E\\E=10^{19.5961}[/tex]
So, Energy is 10^{19.5961} ergs