Let $n=e^x$ and $p=\log_2e$ therefore $$\lim_{n\to\infty}\dfrac{f(n)}{g(n)}=\lim_{x\to\infty}\dfrac{e^{x^2}}{(px)^{e^x}}$$also we know that for large enough $x$$$\dfrac{e^{x^2}}{(px)^{e^x}}<\dfrac{e^{x^2}}{(e)^{e^x}}=e^{x^2-e^x}$$and $$\lim_{{x\to\infty}}e^{x^2-e^x}=0$$ therefore $$\lim_{n\to\infty}\dfrac{f(n)}{g(n)}=\lim_{x\to\infty}\dfrac{e^{x^2}}{(px)^{e^x}}=0$$which shows us neither $f(n) \in O(g(n))$ nor $g(n) \in O(f(n))$
Let $n=e^x$ and $p=\log_2e$ therefore $$\lim_{n\to\infty}\dfrac{f(n)}{g(n)}=\lim_{x\to\infty}\dfrac{e^{x^2}}{(px)^{e^x}}$$also we know that for large enough $x$$$\dfrac{e^{x^2}}{(px)^{e^x}}<\dfrac{e^{x^2}}{(e)^{e^x}}=e^{x^2-e^x}$$and $$\lim_{{x\to\infty}}e^{x^2-e^x}=0$$ therefore $$\lim_{n\to\infty}\dfrac{f(n)}{g(n)}=\lim_{x\to\infty}\dfrac{e^{x^2}}{(px)^{e^x}}=0$$which shows us neither $f(n) \in O(g(n))$ nor $g(n) \in O(f(n))$