20 hunters probability 
From a group of 20 hunters, 5 hit a target with probability $\frac45$, 7 with probability $\frac35$ and 8 with probability $\frac12$. A hunter taken at random shoots, without hitting the target. Which is the probability that he belongs to the first group?

Is it okay to consider $A_i$: He is from group $i$, $B$: He hits target and calculate first $P(B)$ with law of total probability and then use Bayes's theorem?

The law of total probability will be enough.
$$P=\frac{\frac5{20}\cdot\frac15}{\frac5{20}\cdot\frac15+\frac7{20}\cdot\frac25+\frac8{20}\cdot\frac12}=\frac{\frac1{20}}{\frac1{20}+\frac7{50}+\frac15}=\frac5{5+14+20}=\frac5{39}$$
