Your first differential equation is incomplete, so I'll just look at the second one.
y' + 2xy = 4x
Multiply both sides by exp(x ²):
exp(x ²) y' + 2x exp(x ²) y = 4x exp(x ²)
The left side is the derivative of a product:
(exp(x ²) y )' = 4x exp(x ²)
Integrate both sides:
exp(x ²) y = ∫ 4x exp(x ²) dx
For the integral, substitute u = x ² and du = 2x dx :
exp(x ²) y = 2 ∫ exp(u) du
Solve for y :
exp(x ²) y = 2 exp(u) + C
exp(x ²) y = 2 exp(x ²) + C
y = 2 + C exp(-x ²)