Problem statement:
A shop is provided by $2$ distributors of keyboards. From the first distributor the shop buys $21$ normal keyboards and $14$ wireless keyboards, and from the second one $11$ normal keyboard and $22$ wireless keybaords. Knowing that the shop sold a wireless keyboard, which is the probability that, that keyboard was from the second distributor?
Let
$A_1$ = "keyboard sold from the first distributor"
$A_2$ = "keyboard sold from the second distributor"
$B$ = "keyboard is wireless"
Then we need to find $P(A_2 | B)$
In my textbook it says that $P(A_1) = P(A_2) = \frac 12$ But i think it doesn't make sense since there are more keyboards from the first than from the second.
Your textbook is absolutely correct. What that statement means is that, before having any knowledge of what kind of keyboard each shop sells and how many of each and which one you received. The probability that the keyboard came from any of the shops is equally likely.
Once you receive your keyboard and enquire about what kind of keyboard each shop sells and how many it has of each type. You can update your initial probabilities of a 50-50 chance using this information. Which is what you’re asked to do.