This is a numerical-answer question. The correct answer is shown below.
[Solution by Dr. Abubacker] Let a non-smoker's chance of cancer be $p$; a smoker's is $27p$. By Bayes' theorem $P(\text{smoker}|\text{cancer})=\frac{0.25\times27p}{0.25\times27p+0.75\times p}=\frac{6.75}{7.5}=0.9=\frac9{10}$. So $k=9$. Answer: 9.