To solve problems like these, you have to count how many outcomes satisfy your request, and then divide them by the number of total possible outcomes.
There are 10 marbles in the bag (5+2+3=10). So, this is the number of total outcomes, which we will use as denominator.
Since there are 2 black marbles, the 8 remaining marbles are non-black. So, you have 8 chances out of 10 to draw a non-black marble, which leads to a probability of

Similarly, since you have 3 red marbles, you have 3 chances out of 10 to draw a non-black marble, which leads to a probability of
