>>1424165first he used integration by parts to split up the integral into two terms
https://mathworld.wolfram.com/Erfi.htmlhe knows that the imaginary error function, erfi, has a derivative defined as:
d/dx [erfi(x)] = 2/(sqrtπ) e^(x^2)
so
erfi(x) = 2/(sqrtπ) * INT[e^(x^2)dx]
INT[e^(x^2)dx] = (sqrtπ)/2 erfi(x)
which looks almost like the second term
he is pulling out constants to match the integral and make the erfi(x) substitution