Alright, lets get started.
We have given the ratio 9:45
or
could be written as

Means the given ratio is 1:5.
Means every given number should be in this ratio 1:5.
? : 30 means

Cross multiplying

Hence x = 6
For 7 : ?

Cross multiplying
x = 35
For 8 : ?

Cross multiplying
x = 40
Hence the answers are 6 30, 7 35, 8 40. : Answer
Hope it will help :)