So I am deriving a general solution to the particular solution of the following differential equation with complex methods:
$$\frac{\mathrm{d} y}{\mathrm{d} t} - ay = A\cos(\omega t) + B\sin(\omega t)$$
where the following conditions apply: $$a\in\mathbb{R}$$ $$A\in\mathbb{R}$$ $$B\in\mathbb{R}\,\backslash\, \begin{Bmatrix} 0 \end{Bmatrix}$$ $$\omega\in\mathbb{R^{+}}$$ ($\omega$ could be negative, but due to the evenness and oddness to the cosine and sine functions, the only difference that would be seen is that $B\sin(\omega t)$ would be subtracted from instead of added to $A\cos(\omega t)$. $\omega$, however, cannot equal to 0.)
The goal is to show that the particular solution is of the form $M\cos(\omega t) + N\sin(\omega t)$, where:
$$M=-\frac{aA+\omega B}{\omega^{2}+a^{2}}$$ $$N=\frac{\omega A - aB}{\omega^{2} + a^{2}}$$
The first step is to rewrite $A\cos(\omega t) + B\sin(\omega t)$ to the form $R\cos(\omega t - \phi)$. Using the Angle Difference Formula, one can deduce that $A^{2} + B^{2} = R^{2}$ and $\tan(\phi) = \frac{B}{A}$. $\sqrt{A^{2}+B^{2}}$ is the amplitude of the resulting cosine function, and consider only the positive square root in order to not have to consider any extra shifts to the cosine function. $\phi$ can be expressed as $\mathrm{atan2(B, A)}$ since the range of the $\arctan$ function would not always provide the correct angle under the conditions presented above for $A$ and $B$. However, since from the condintion for $B$, $B \neq 0$, $\phi$ can then be represented solely as the principle argument of the $\mathrm{atan2}$ function such that:
$$\phi =2\arctan(\frac{B}{A+\sqrt{A^{2}+B^{2}}})$$ Where $\phi\in(-\pi,\pi)$
$A\cos(\omega t) + B\sin(\omega t)$ can, therefore, be rewritten as:
$$A\cos(\omega t) + B\sin(\omega t) = \sqrt{A^{2} + B^{2}}\cos(\omega t - 2\arctan(\frac{B}{A+\sqrt{A^{2}+B^{2}}}))$$
The above equality can also be shown by taking the derivative of both sides while applying the conditions for $A$, $B$, and $\omega$ to show that the derivative of both sides of the equality are equal, and then setting $t=0$ (the other variables are constants) on both sides of the equality to show that both sides evaluate to $A$ at $t=0$.
Now the differential equation can be rewritten as:
$$\frac{\mathrm{d} y}{\mathrm{d} t} - ay = \sqrt{A^{2} + B^{2}}\cos(\omega t - 2\arctan(\frac{B}{A+\sqrt{A^{2}+B^{2}}}))$$
Notice that the above differential equation can be rewritten as:
$$\frac{\mathrm{d} y}{\mathrm{d} t} - ay = \mathrm{Re}(\sqrt{A^{2}+B^{2}}\, e^{i(\omega t - 2\arctan(\frac{B}{A+\sqrt{A^{2}+B^{2}}}))})$$
It is known that the complex function $ke^{i \omega t}$, where $k\in\mathbb{C}$, is holomorphic, and since $\frac{\mathrm{d} y}{\mathrm{d} t} - ay$ is a linear transformation, one can apply the fact that the linear transformation of the real part is equivalent to the real part of the linear transformation. Therefore, one only needs to solve the following complex differential equation and take the real part of the solution to get the solution of the real differential equation:
$$\frac{\mathrm{d} y}{\mathrm{d} t} - ay = \sqrt{A^{2}+B^{2}}\, e^{i(\omega t - 2\arctan(\frac{B}{A+\sqrt{A^{2}+B^{2}}}))}$$
This differential equation is much easier to solve than the first one that was presented. Again, since $Ye^{i \omega t}$ is holomorphic, where $Y\in\mathbb{C}$, its derivative is just a complex constant multiplied by $e^{i \omega t}$. Therefore, a particular solution to the differential equation is $y_{p}(t) = Ye^{i \omega t}$. Substituting the particular solution to the differential equation and solving for $Y$ yields:
$$Y=\frac{\sqrt{A^{2}+B^{2}}\; e^{-2i\arctan(\frac{B}{A+\sqrt{A^{2}+B^{2}}})}}{i\omega -a}$$
Now, $\frac{1}{i\omega - a}$ can be rewritten as $-\frac{a}{\omega^{2}+a^{2}} - \frac{\omega}{\omega^{2}+a^{2}}i$. The magnitude of that complex number is $\frac{1}{\sqrt{\omega^{2}+a^{2}}}$, and the angular argument can be written implicitly as $\tan(\alpha) = \frac{\omega}{a}$. Again, $\alpha$ can be expressed as $\mathrm{atan2(\omega, a)}$ since the range of the $\arctan$ function would not always provide the correct angle under the conditions presented above for $\omega$ and $a$. However, since from the condintion for $\omega$, $\omega \neq 0$, $\alpha$ can then be represented solely as the principle argument of the $\mathrm{atan2}$ function such that:
$$\alpha =2\arctan(\frac{\omega}{a+\sqrt{\omega^{2}+a^{2}}})$$
$Y$ could then be rewritten as:
$$Y=\sqrt{\frac{A^{2}+B^{2}}{\omega^{2}+a^{2}}}\; e^{i(-2\arctan(\frac{B}{A+\sqrt{A^{2}+B^{2}}})+2\arctan(\frac{\omega}{a+\sqrt{\omega^{2}+a^{2}}}))}$$
Multiply $Y$ by $e^{i \omega t}$ to obtain $y_{p}(t)$:
$$y_{p}(t)=\sqrt{\frac{A^{2}+B^{2}}{\omega^{2}+a^{2}}}\; e^{i(\omega t -2\arctan(\frac{B}{A+\sqrt{A^{2}+B^{2}}})+2\arctan(\frac{\omega}{a+\sqrt{\omega^{2}+a^{2}}}))}$$
By Euler's formula, one has that:
$$y_{p}(t)=\sqrt{\frac{A^{2}+B^{2}}{\omega^{2}+a^{2}}}\; (\cos(\omega t)+i\sin(\omega t))(\cos(\phi)- i\sin(\phi))(\cos(\alpha)+i\sin(\alpha))$$
where:
$$\phi =2\arctan(\frac{B}{A+\sqrt{A^{2}+B^{2}}})$$ $$\alpha =2\arctan(\frac{\omega}{a+\sqrt{\omega^{2}+a^{2}}})$$
Before the real part is taken, notice some simplifications that can be made. It is known that $\cos(\arctan(x)) = \frac{1}{\sqrt{1+x^{2}}}$ and $\sin(\arctan(x)) = \frac{x}{\sqrt{1+x^{2}}}$ $\forall x\in\mathbb{R}$, which can be proven using geometric or algebraic methods. The double angle identies can then be derived:
$$\cos(2\arctan(x)) = \cos^{2}(\arctan(x)) - \sin^2(\arctan(x))$$ $$=(\frac{1}{\sqrt{1+x^{2}}})^{2} - (\frac{x}{\sqrt{1+x^{2}}})^{2}=\frac{1-x^{2}}{1+x^{2}}$$
$$\sin(2\arctan(x))=2\sin(\arctan(x))\cos(\arctan(x)) =2 \cdot \frac{x}{\sqrt{1+x^{2}}} \cdot \frac{1}{\sqrt{1+x^{2}}}$$ $$=\frac{2x}{1+x^{2}}$$
Using the above identities, start with simplifying $\cos(2\arctan(\frac{B}{A+\sqrt{A^{2}+B^{2}}}))$:
$$\cos(2\arctan(\frac{B}{A+\sqrt{A^{2}+B^{2}}})) = \frac{1-(\frac{B}{A+\sqrt{A^{2}+B^{2}}})^{2}}{1+(\frac{B}{A+\sqrt{A^{2}+B^{2}}})^{2}}$$
Simplify the numerator and denominator separately. Expanding the numerator results in:
$$1-(\frac{B}{A+\sqrt{A^{2}+B^{2}}})^{2} = 1-\frac{B^{2}}{2A^{2}+B^{2}+2A\sqrt{A^{2}+B^{2}}}$$ $$=\frac{2A^2 + B^2 + 2A\sqrt{A^{2}+B^{2}} - B^2}{(A+\sqrt{A^{2}+B^{2}})^{2}}=\frac{2A(A+\sqrt{A^{2}+B^{2}})}{(A+\sqrt{A^{2}+B^{2}})^{2}}$$
Notice that, from the conditions stated earlier about the constants in the differential equation, $B \neq 0$. Since $B \neq 0$, the expression $A+\sqrt{A^{2}+B^{2}}$, therefore, never equals to 0. Therefore, the numerator and the denominator can both be divided by $A+\sqrt{A^{2}+B^{2}}$, which results in:
$$\frac{2A}{A+\sqrt{A^{2}+B^{2}}}$$
Now evaluate the denominator of the expression for $\cos(2\arctan(\frac{B}{A+\sqrt{A^{2}+B^{2}}}))$:
$$1+(\frac{B}{A+\sqrt{A^{2}+B^{2}}})^{2} = 1+\frac{B^{2}}{2A^{2}+B^{2}+2A\sqrt{A^{2}+B^{2}}}$$
$$=\frac{2A^2 + B^2 + 2A\sqrt{A^{2}+B^{2}} + B^2}{(A+\sqrt{A^{2}+B^{2}})^{2}} = \frac{2A^2 + 2B^2 + 2A\sqrt{A^{2}+B^{2}}}{(A+\sqrt{A^{2}+B^{2}})^{2}}$$
So $\cos(2\arctan(\frac{B}{A+\sqrt{A^{2}+B^{2}}}))$ then evaluates to:
$$\cos(2\arctan(\frac{B}{A+\sqrt{A^{2}+B^{2}}}))=\frac{\frac{2A}{A+\sqrt{A^{2}+B^{2}}}}{\frac{2A^2 + 2B^2 + 2A\sqrt{A^{2}+B^{2}}}{(A+\sqrt{A^{2}+B^{2}})^{2}}}$$
Since $A+\sqrt{A^{2}+B^{2}} \neq 0$, the expression simplifies to:
$$\frac{2A(A+\sqrt{A^{2}+B^{2}})}{2A^{2}+ 2B^{2}+2A\sqrt{A^{2}+B^{2}}}$$
Factoring the denominator results in:
$$\frac{2A(A+\sqrt{A^{2}+B^{2}})}{2\sqrt{A^{2}+B^{2}}(A+\sqrt{A^{2}+B^{2}})}$$
Again, $A+\sqrt{A^{2}+B^{2}} \neq 0$. Therefore, one obtains:
$$\cos(2\arctan(\frac{B}{A+\sqrt{A^{2}+B^{2}}}))=\frac{A}{\sqrt{A^{2}+B^{2}}}$$
Similarly, one can derive the following expressions using the conditions that were imposed in the beginning:
$$\sin(2\arctan(\frac{B}{A+\sqrt{A^{2}+B^{2}}}))=\frac{B}{\sqrt{A^{2}+B^{2}}}$$ $$\cos(2\arctan(\frac{\omega}{a+\sqrt{\omega^{2}+a^{2}}}))=\frac{a}{\sqrt{\omega^{2}+a^{2}}}$$ $$\sin(2\arctan(\frac{\omega}{a+\sqrt{\omega^{2}+a^{2}}}))=\frac{\omega}{\sqrt{\omega^{2}+a^{2}}}$$
Substituting the above information into $y_{p}(t)$ results in:
$$\sqrt{\frac{A^{2}+B^{2}}{\omega^{2}+a^{2}}}(\cos(\omega t)+i\sin(\omega t))(\frac{A}{\sqrt{A^{2}+B^{2}}}-i\frac{B}{\sqrt{A^{2}+B^{2}}})(\frac{a}{\sqrt{\omega^{2}+a^{2}}}+i\frac{\omega}{\sqrt{\omega^{2}+a^{2}}})$$
Now take the real part of $y_{p}(t)$ to get the particular solution of the real differential equation:
$$\mathrm{Re}(y_{p}(t)) = \frac{aA+\omega B}{\omega ^{2}+a^{2}}\cos(\omega t) + \frac{aB-\omega A}{\omega ^{2}+a^{2}}\sin(\omega t)$$
The problem is that this solution is the negative version of what the actual solution should be. I have been looking at this for a long time now and I cannot see where there should be an extra minus sign. I do not think that it is a simple sign error, though I could be wrong.
I found the problem in my derivation. When I said that $\frac{1}{i \omega - a}$ = $-\frac{a}{\omega^{2} + a^{2}} - \frac{\omega}{\omega^{2} + a^{2}}i$, although it is true $\tan(\alpha) = \frac{\omega}{a}$, I forgot that the negative signs from the complex number would have to be maintained in the two variable function $\mathrm{atan2}(y,x)$, since $\tan(\alpha) = \frac{\omega}{a}$ would have two solutions for $\alpha\in(-\pi,\pi)$. Therefore, $\alpha = \mathrm{atan2}(-\omega, -a) = 2\arctan(\frac{-\omega}{\sqrt{\omega^{2}+a^{2}}-a}) = -2\arctan(\frac{\omega}{\sqrt{\omega^{2}+a^{2}}-a})$. Substituing this expression instead leaves one with the correct answer. Sorry for the sign mistake everyone.