I assume you mean the total number of jazz and classical songs combined is 28 songs?
3 times as many jazz as classical:
Means there is a ratio of 3 jazz to 1 classical, which means there are essentially 4 parts (3+1=4). So if we divide 28/4=7. This gives one part = number of classical songs, jazz is 3 parts so 7*3=21 jazz songs.
7 times as many rock as classical:
From above we know there are 7 classical songs. 7*7=49 rock songs.
Jazz=21 songs
Rock=49 songs