Two problems I'm stuck on.( sorry these aren't separable, they are first order linear, i wrote the wrong thing)

1: t*(dy/dt) + 2y = t^2 - t + 1

2: t*(dy/dt) + (t+1)*y = t

Any help finding the general solutions would be much appreciated.

I already got the integrating factors as 1: exp(2lnt) and 2: exp(t+lnt)