Your computed answers are correct. It would just be nice to put them togther in a clear way. Indeed, we can do that in such a way that the solution reads almost directly as the statement of the problem.
I see from your "(9 C 3)" that you like to put C, the choose-combinations function, between its arguments. We can do that, but the Maple syntax requires that we make it &C if the function name goes between its arguments. The "choose" function in Maple is called binomial, which we'll rename &C. (Don't confuse this with the binomial probability distribution that was used for your heads-and-tails problem, which is essentially a "with replacement" problem. This problem uses what is technically called the hypergeometric distribution. They both use make use of the "choose" function.)
(Lines in bold are the input you give to Maple. Lines in italics are Maple's respones. (Usually, I suppress the response by ending a Maple input line with a colon.) Lines in normal typeface are my comments.)
The backquotes (``) are required when a name with special characters is being assigned to, or when it is otherwise being used as a name.
Input the problem data:
wht, tn, pnk, pur, yel, orn, gr:= 19, 10, 7, 3, 5, 2, 6:
Check the total to make sure:
total := 52
(Note the backquotes around the +.) The percent sign % is used to represent the output of the last command.
Now here's your problem A. Read the command aloud to yourself like this: "From the whites, choose 3; from the nonwhites, choose the rest of the 9. In all, we've chosen 9 from the total."
(wht &C 3) * ((total-wht) &C (9-3)) / (total &C 9);
Get a decimal answer with the evalf command.
Which agrees with the answer that you got. (Notice that % again.)
Now for your problem B: In the command below, the lengthy factor with all the used colors being subtracted from the total is just 1. I only include it for didactic completeness.
(wht &C 3) * (tn &C 2) * (pnk &C 1) * (yel &C 1) * (gr &C 2)
* ((total-(wht+tn+pnk+yel+grn)) &C (9-(3+2+1+1+2))) / (total &C 9);
which agrees with the answer that you got. Note that the number is presented in "scientific notation".