Let amount of 30% to mix, be T
Then amount of 18% to mix = 300 - T
We then get: .3T + .18(300 - T) = .21(300)
.3T + .18(300) - .18T = .21(300)
.3T - .18T = .21(300) - .18(300)
.12T = .03(300)
Amount of 30% to mix, or
You should be able to calculate the amount of the 18% that's needed.