Simple definition of probability = No. of possible "favourable" outcomes / No. of total possible outcomes.
Let the bag have x black discs.
Then the total number of discs = 6 + 3 + x = x + 9
From this we have to select a red disc.
No. of red discs = No. of favourable outcomes = 6
No. of total possible outcomes = x + 9
So, 6/(x + 9) = 2/5
Or, 3/(x + 9) = 1/5
Cross-multiplying, x + 9 = 15
So, x = 6
There are 6 black discs in the bag.
:)