You have the ratios $p^2:2p(1-p):(1-p)^2$, which sum to $1$
You are given the count data $42,52,22$ summing to $116$. This suggests A is more common than C so you might guess $\hat p > \frac12$.
The likelihood is proportional to $$\left(p^2\right)^{42}\left(2p(1-p)\right)^{52}\left(1-p)^2\right)^{22}$$ which $($ignoring powers of $2)$ is proportional to $$p^{2\times 42+52}(1-p)^{52+2\times 22} = p^{136}(1-p)^{96}$$ and this is maximised when $\hat p =\frac{136}{136+96}=\frac{136}{232}=\frac{68}{116}=\frac{17}{29} \approx 0.5862$ as your book says.
If that was correct, it might suggest expected values for the counts of about $39.86,56.28,19.86$ and you can perform your chi-squared test (with two degrees of freedom) in the usual way. Intuitively these modelled numbers look close to the observed numbers so you will not reject the null hypothesis. In R:
obs <- c(42, 52, 22)
phat <- (2*obs[1] + obs[2]) / (2*sum(obs))
chisq.test(obs, p=c(phat^2, 2*phat*(1-phat), (1-phat)^2))
Chi-squared test for given probabilities
data: obs
X-squared = 0.66967, df = 2, p-value = 0.7155