Part A)
You can get any of the numbers 1 through 6 on the number cube, and either heads (H) or tails (T) on either coin at one time. This gives us the sample space
{(1, H, H), (1, H, T), (1, T, H), (1, T, T)
(2, H, H), (2, H, T), (2, T, H), (2, T, T)
(3, H, H), (3, H, T), (3, T, H), (3, T, T)
(4, H, H), (4, H, T), (4, T, H), (4, T, T)
(5, H, H), (5, H, T), (5, T, H), (5, T, T)
(6, H, H), (6, H, T), (6, T, H), (6, T, T)}
Part B)
There are 8 outcomes that fit these criteria (coins come up differently and prime number) out of a total of 24 outcomes, so the probability is 8/24=1/3.