You have x number of minutes of advertisements. Programming is 6 minutes more than 2 times the ads so it can be expressed as
X = Ad time
2X+6= Programming
Total = 30
X+2x+6=30
Simplified is 3x + 6 = 30
Subtract 6 from both sides 3X = 24
Divide both sides by 3 and X=8
Since X is ad time we know that ad time is 8 minutes
Programming is 2X+6 which is 2(8)+6 = 22 minutes
I hope that helps