Look into any standard Calculus textbook and find the solution there. Why we should re-write from textbooks for you ? If you suffer allergy looking into Calculus textbooks, then use these links for (a) https://www.quora.com/What-is-the-integration-of-xe-x-2-dx-from-x-0-to-infinity for (b) https://math.stackexchange.com/questions/9286/proving-int-0-infty-mathrme-x2-dx-frac-sqrt-pi2