Average number of comparisons for a successful search of a prime number in a binary search tree
This is a very simple question, I will explain steps-by-steps:
First, you need to count total elements and total comparisons in your tree
Second, you need to know that for each element in the tree, it takes $\frac{total \ comparisons}{total \ elements}$ average comparisons to search for an element in the tree.
Third, if the problem gives you a probability to search for an element, you need to multiply it by each element.
Now back to your question:

Total elements = $10$, total comparisons = $1 \cdot 1 + 2 \cdot 2 + 3\cdot 3 + 2 \cdot 4 + 2\cdot 5 = 33$ (this is calculated by taking the total nodes at each level and multiply it by the level, you need to draw the tree to understand).
The tree has $5$ odd elements and $5$ even elements, you need to do now is to take the probability and multiply it by each element, which in your case is $\frac{1}{10} \cdot 5 + \frac{1}{25} \cdot 5 = \frac{1}{2} + \frac{1}{5} = \frac{7}{10}$.
Now your expected value is: $E(x) = \frac{33}{\frac{7}{10} \cdot 10} = \frac{33}{7}$, which is also the solution for your problem.