Find Particular and then General Solution of Complex Function

I dont quite know how to begin with this question.

$\displaystyle \dot{z} = \lambda z + g(t)$ (1)

where $\displaystyle \lambda \in \mathbb{C}$, and $\displaystyle g(t)$ is a continuous complex function of real variable.

a) Derive the variation of constants formula for finding a particular solution of (1).

b) Using this formula, find the general solution of (1) with $\displaystyle g(t) = cos(t) + i sin(2t).$

I tried to write z as (x+iy) and find a solution using variable of constants(parameters) method, but have come to no avail, i missed the lecture which covered this but even with borrowing someone elses notes i cant seem to work it out, neither can most people ive spoken to, how would i go about doing this question?