Here is what I think your professor is getting at.
If $Z$ satisfies the ODE, then $\dot{z_2} = \lambda z_2$ and so $z_2$ has the form $z_2(t) = z_2(0) e^{\lambda t}$. To get $z_1$ you can solve the equation
$\dot{z_1} = \lambda z_1+z_2$, which is why (I think) your professor gave you
the function $f$.
Show that $\dot{f}(t) = 0$. This follows because $Z$ satisfies the ODE, and means that $f$ is constant. So $z_1(t)-t z_2(t) = c_0 e^{\lambda t}$ for some constant. That is,
$z_1(t) = c_0 e^{\lambda t} + t z_2(0) e^{\lambda t}$.
To see why $\dot{f}(t) = 0$, differentiate to get
$\dot{f}(t) = e^{-\lambda t} (\dot{z_1}(t)-t \dot{z_2}(t) - z_2(t)) - \lambda e^{-\lambda t} ( z_1(t) - t z_2(t))$. Now use the fact that $\dot{z_1}(t) = \lambda z_1(t)+ z_2(t)$ and $\dot{z_2}(t) = \lambda z_2(t)$.
Now choose $\alpha=c_0, \beta = z_2(0)$.
Note: This solution glossed over one significant point, which is to show that $t \mapsto z_2(0) e^{\lambda t}$ is the only (unique) solution to
$\dot{z_2} = \lambda z_2$ (with the specified initial condition). And if one
is willing to accept that the solution of the differential equation (passing through a specified initial point) is unique, then there is a simpler solution as Git Gud's comment points out.
To show that the single dimensional equation has a unique solution (this
can be extended to the general $\dot{x} = Ax$ case, but needs to use the
matrix exponential), suppose $x,y$ are two solutions to $\dot{z_2} = \lambda z_2$ with $x(0) = y(0)$. Then let $\delta = x-y$ and note that $\delta$ satisfies the same differential equation. Then consider
$\phi(t) = e^{-\lambda t} \delta(t)$. We see that $\dot{\phi}(t) = 0$, so
$\phi(t) = \phi(0) = 0$ and so $\delta(t) = 0$ for all $t$, hence $x=y$.
Git Gud's comment below gives a more general version of this approach.