Applying the formula, you have:
A = the number is prime
B = the number is odd
I assume that with "random" you imply that all numbers can be chosen with the same probability. So, we have
because 4 out of 8 numbers are prime: 2, 3, 5 and 7.
Similarly, we have
because 4 out of 8 numbers are odd: 1, 3, 5 and 7.
Finally,
because 3 out of 8 numbers are prime and odd: 3, 5 and 7.
So, applying the formula, we have
Note:
I think that it is important to have a clear understanding of what's happening from a conceptual point of you: conditional probability simply changes the space you're working with: you are not asking "what is the probability that a random number, taken from 1 to 8, is prime?"
Rather, you are adding a bit of information, because you are asking "what is the probability that a random number, taken from 1 to 8, is prime, knowing that it's odd?"
So, we're not working anymore with the space {1,2,3,4,5,6,7,8}, but rather with {1,3,5,7} (we already know that our number is odd).
Out of these 4 odd numbers, 3 are primes. This is why the probability of picking a prime number among the odd numbers in {1,2,3,4,5,6,7,8} is 3/4: they are literally 3 out of 4.