Find the solution for the PDE where $u = u(x,t)$
$$ u_x + xu_t = t $$
$u_x=\frac{\partial{u}}{\partial{x}}$ and $u_t=\frac{\partial{u}}{\partial{t}}$
Given $u(0,t) = 0$ and $u(x,0)=0$
I was asked this in one of my exams to solve using Laplace Transform but it ended up resulting in a solution with $erfi(z)$ whose inverse LT happens to be extremely complex. I'm a fresher taking my first DE class.

Let me sketch here the solution of the PDE $$ u_x+xu_t=t. \tag{1} $$ using the Laplace transform. Transforming both sides of $(1)$ and using the initial condition $u(x,0)=0$, we obtain $$ U_x(x,s)+sx\,U(x,s)=\frac{1}{s^2}. \tag{2} $$ The ODE $(2)$ can be solved using standard methods; its general solution is $$ U(x,s)=U_0(s)e^{-\frac{1}{2}sx^2}+\int_0^{x}\frac{1}{s^2}e^{\frac{1}{2}s(\xi^2-x^2)}d\xi. \tag{3} $$ Taking the inverse Laplace transform of $(3)$, we obtain $$ u(x,t)=f(t-\frac{1}{2}x^2)\,\Theta(t-\frac{1}{2}x^2)+\int_0^x(t+\frac{1}{2}(\xi^2-x^2))\Theta(t+\frac{1}{2}(\xi^2-x^2))\,d\xi, \tag{4} $$ where $f(t)={\cal L}^{-1}(U_0(s))$ and $\Theta$ is the Heaviside step function. To compute the integral in $(4)$, we notice that the argument of $\Theta$ in the integrand is positive if $\xi<-\sqrt{x^2-2t}$ or $\xi>\sqrt{x^2-2t}$. The first possibility can be ignored, since it is outside the range of integration; the second yields \begin{align} \int_0^x(t+\frac{1}{2}(\xi^2-x^2))\Theta(t+\frac{1}{2}(\xi^2-x^2))\,d\xi &=\int_{\sqrt{x^2-2t}}^x(t+\frac{1}{2}(\xi^2-x^2))\,d\xi \\ &=tx-\frac{1}{3}x^3+\frac{1}{3}(x^2-2t)^{3/2}. \tag{5} \end{align} We notice, however, that the last term in $(5)$ only makes sense if $x^2-2t\geq 0$, so we shall enforce this condition with the Heaviside function $\Theta(x^2-2t)$. Then, combining $(4)$ and $(5)$ we obtain $$ u(x,t)=tx-\frac{1}{3}x^3+\frac{1}{3}(x^2-2t)^{3/2}\,\Theta(x^2-2t)+f(t-\frac{1}{2}x^2)\,\Theta(2t-x^2). \tag{6} $$ We notice that $(6)$ satisfies the initial condition $u(x,0)=0$ for any $f$ (as it should, as this condition was used in the computation of the Laplace transform of the PDE). On the other hand, the function $f$ is determined by the boundary condition $u(0,t)=0$: $$ 0=u(0,t)=f(t), \tag{7} $$ so $(6)$ simplifies to $$ u(x,t)=tx-\frac{1}{3}x^3+\frac{1}{3}(x^2-2t)^{3/2}\,\Theta(x^2-2t). \tag{8} $$ This is precisely the solution found by @JJacquelin in his answer.