A picture helps:
1. sin(θ) = 20/L ; L = 20/ sin(θ); θ = 40°
$${\mathtt{L}} = {\frac{{\mathtt{20}}}{\underset{\,\,\,\,^{\textcolor[rgb]{0.66,0.66,0.66}{360^\circ}}}{{sin}}{\left({\mathtt{40}}^\circ\right)}}} \Rightarrow {\mathtt{L}} = {\mathtt{31.114\: \!476\: \!537\: \!185\: \!947\: \!2}}$$
L = 31 cm to nearest cm
2. Lcos(θ) + 7.3 = L; L = 7.3/(1 - cos(θ));
$${\mathtt{L}} = {\frac{{\mathtt{7.3}}}{\left({\mathtt{1}}{\mathtt{\,-\,}}\underset{\,\,\,\,^{\textcolor[rgb]{0.66,0.66,0.66}{360^\circ}}}{{cos}}{\left({\mathtt{40}}^\circ\right)}\right)}} \Rightarrow {\mathtt{L}} = {\mathtt{31.202\: \!507\: \!422\: \!010\: \!490\: \!6}}$$
L = 31 cm to nearest cm.