Step 1: Recall the direction cosine rule.
If a line makes angles with the x, y and z axes, the cosines of those three angles are called direction cosines. A basic fact is that the sum of their squares is always one.
\[ \cos^2\alpha + \cos^2\beta + \cos^2\gamma = 1 \]
Step 2: Write what we know.
The line makes $45^\circ$ with the x-axis and $60^\circ$ with the y-axis. So $\alpha = 45^\circ$ and $\beta = 60^\circ$. We want $\gamma$, the angle with the z-axis.
Step 3: Find the two known cosines.
We know $\cos 45^\circ = \frac{1}{\sqrt{2}}$ and $\cos 60^\circ = \frac{1}{2}$. Squaring them gives $\frac{1}{2}$ and $\frac{1}{4}$.
Step 4: Put these into the rule.
Substitute into the sum-of-squares rule.
\[ \frac{1}{2} + \frac{1}{4} + \cos^2\gamma = 1 \]
Step 5: Solve for $\cos^2\gamma$.
Add the two fractions to get $\frac{3}{4}$. Then subtract from one.
\[ \cos^2\gamma = 1 - \frac{3}{4} = \frac{1}{4} \]
Step 6: Take the root and pick the acute angle.
Take the square root: $\cos\gamma = \frac{1}{2}$ for the acute case. The angle whose cosine is $\frac{1}{2}$ is $60^\circ$.
\[ \gamma = 60^\circ \]
\[ \boxed{60^\circ} \]