The total number of balls in the bag $$= 3 + 4 + 1 = 8$$ balls
So, the number of possible outcomes $$= 8 = n(S)$$
Neither yellow ball nor red ball means a blue ball
Event of not drawing a yellow or red ball $$= E = 4$$
So, $$n(E) = 4$$
Thus, probability of not drawing a yellow or red ball $$= n(E)/ n(S) = 4/8 = 1/2$$