Solution (source code)

= Solution

Now $R=1+r=9/8$. The local <risk-neutral probability in a binomial market>[risk-neutral up probabilities] solve $RS=qS_u+(1-q)S_d$. They are
$$
q_0=\frac{(9/8)5-4}{6-4}=\frac{13}{16},
\qquad
q_u=\frac{(9/8)6-5}{7-5}=\frac78,
\qquad
q_d=\frac{(9/8)4-3}{5-3}=\frac34.
$$
The terminal payoff of the <European put option> with strike $5$ is $0,0,2$ at stock prices $7,5,3$. <Backward option pricing> gives time-one values
$$
V_u=0,
\qquad
V_d=R^{-1}\left(\frac14\cdot2\right)=\frac49,
$$
and hence
$$
V_0=R^{-1}\left(\frac{3}{16}\frac49\right)=\boxed{\frac{2}{27}}.
$$
The first-period stock holding in the <replicating portfolio in a binomial market> is
$$
\Delta_0=\frac{V_u-V_d}{6-4}=-\frac29.
$$
\b[Thus the hedge initially shorts $2/9$ of a share.]