Since dividends and interest rates mature annually and the time of expiry is two years, we can model the option as a two-step binomial tree, structured as the one in figure:
Data from OP question:
$S_0 = 45$ current price of the underlying $S$; $\hspace{2.5cm}$ $\sigma = 0.2\;\text{per annum}$ volatility of $S$;
$r = 0.02\;\text{per annum}$ interest rate; $\hspace{3.5cm}$ $d = 0.04\;\text{per annum}$ dividend from $S$;
$T = 2\ \text{years}$ expire date of option on $S$; $\hspace{2.7cm}$ $K = 30$ strike price of the option;
$P(T) = \max(K - S(T), 0)$ we are trying to price a put option.
One can solve this in various ways. Let's proceed here with risk neutral valuation, that implies following the steps below:
- compute how much $S$ can shift up or down when moving from step to step
- compute risk neutral probability of an upmove, $p_{RN}$
- evaluate $S$ at each node $B, C, D, E, F$
- obtain value of the option $P(T)$ at final possible nodes $D, E, F$
- calculate the current value of the option, $P(0)$, as the expected value from $P(T) \sim \{P_D, P_E, P_F \}$
$S$ can move one standard deviation up or down, that is $S_{i} - S_{i - 1} = \Delta S = \sigma \, S_{i - 1} \qquad i = 1,2$
The risk neutral probability $p_{RN}$ of an upmove is obtained considering that a safe investment of the same sum $S_0$ at interest rate $r$ yields $S_0 e^{rT}$ at option expiry $T$.
In order to exclude arbitrage opportunities, $S$ has to grow on average as the safe (risk-free) rate.
However, dividends yielded by the stock while held in our portfolio mean that we should consider a lower risk-free sum of $S_0 e^{(r - d)T}$ for our risk-neutral probability calculation:
$$
p_{RN} S_{up} + \left(1 - p_{RN} \right) S_{down} = S_0 e^{(r - d)\frac{T}{2}}
$$
where length of time step is $\Delta t = T / 2$.
So $p_{RN}$ is:
$$
p_{RN} = \frac{S_0 e^{(r-d)\frac{T}{2}} - S_{down}}{S_{up} - S_{down}} = \frac{\require{cancel}\cancel{S_0} e^{(r-d)\frac{T}{2}} - \cancel{S_0} (1 - \sigma)}{2 \sigma \cancel{S_0}} = 0.4505
$$
To obtain the values of $S$ at each node, traverse it from the root $S_A = S_0$ adding or subtracting $\Delta S$ (that assumes different values for each of the nodes):
$$
\begin{aligned}
S_A &= 45\\
S_B &= S_A - \Delta S = 36 \hspace{1.35cm} S_C = S_A + \Delta S = 54 \qquad\\
S_D &= S_B - \Delta S = 28.8 \qquad S_E = S_B + \Delta S = S_C - \Delta S = 43.2\\
S_F &= S_C + \Delta S = 64.8
\end{aligned}
$$
Quickly evaluate the option payoffs at expiry, $P_D, P_E, P_F$:
$$
\begin{align}
P_D &= \max(K - S_D, 0) = 1.2\\
P_E &= \max(K - S_E, 0) = 0\\
P_F &= \max(K - S_F, 0) = 0
\end{align}
$$
The expected value of $P(0)$ is the present money value (multiply by $e^{-(r - d) T}$) of the expected value of the option at expiry, $E[P(T)]$:
$$
P(0) = e^{-(r - d) T} E[P(T)] = e^{-(r - d) T} \left[ \left( 1 - p_{RN} \right)^2 P_D + 2 \cdot p_{RN} \left( 1 - p_{RN} \right) P_E + p_{RN}^2 P_F \right] = 1.0408 \left[ 0 + 0 + 0.302 \cdot 1.2 \right] = 0.3771
$$
Thus the answer to the question is $P(0) = 0.3771$.