Your total number of ping pong balls is 9. This is your denominator (bottom number) because it is the total. Now just put the other numbers as your numirators(top number)
Red: 2/9
Green: 3/9 or 1/3 simplified
Blue 3/9 or 1/3 simplified
Yellow: 1/9
Tell me if you have questions or need more help. Hope this helped you! :)