Forced Oscillations and Complex Representation 
An oscillating force $F \cos \omega t = \Re\{Fe^{i\omega t}\}$, where $F$ is real, is applied to a mass $m$ on the end of a spring with spring constant $k$. The displacement, $x$, of the particle can be written as $\Re\{z\}$. Explain why $z$ obeys the equation $m\ddot{z} = −kz + Fe^{i\omega t}$ and show that $z = Ae^{i\omega t}$ is a solution to the equation.

So I know how to write a force equation in terms of $x$ from $F = ma$ (i.e., $m\ddot{x} = -kx + F\cos \omega t$) assuming no friction since it wasn't stated in the question, but then I don't know how to put $z$ in to that — why can I replace $x$ with $z$?
I also don't know how to show that $Ae^{i\omega t}$ is a solution, do I just put it in and then say it is a solution when $F - kA  = -m\omega^2$?
 A: 
why can I replace x with z?

In this example, you are designing a complex number $z(t)$ so that its real part is equal to the $x$ variable which you care about. Therefore you wish to design $z$ so that, if $x=\Re(z)$,
$$m\ddot{x} = −kx + Fe^{i\omega t}$$
By design, then, you can replace $x$ with $\Re(z)$.
The reason to do this is that complex numbers are sometimes mathematically simpler to deal with than real numbers. In particular you will be dealing with exponentials rather than cosines.

Explain why $z$ obeys the equation $m\ddot{z} = −kz + Fe^{i\omega t}$

Like Senor O said in the comments, there is a bit of an issue with this. Not any $z$ whose real part is $x$ must satisfy this equation: only the real part of $z$ should, and the imaginary part is free. However, a straightforward (and also useful) choice for $z$ is the one which satisfies the equation above. Then the real part of $z$ will also satisfy it, as we wanted.

I also don't know how to show that $Ae^{i\omega t}$ is a solution, do I just put it in and then say it is a solution when $F - kA  = -m\omega^2$?

Exactly; that is the meaning of "is a solution".
