Type into ChatGPT:
convert to latex:
(X_new-X_old)^2/n=((f_new^(1)-f_old^(1))^2+(f_new^(p)-f_old^(p))^2)/(n1+...+np)
And you may see something like this

So, you basically typed something really simple, and ask ChatGPT to do the annoying math formatting for you ?.