For (a) take g(x)= x and f(x)= 1/x, a= 0.
x→0limg(x)=x→0limx=0 and
x=0limg(x)f(x)=x→0lim1=1 but
x→0limf(x) does not exist.
For (b) reverse those, taking g(x)= 1/x, f(x)= x. Then
x→0limf(x)=0,
x→0limg(x)f(x)=x→0limx2=0 but
x→0limg(x) does not exist.
(It is not a question of the
functions "existing or not existing" but the limits.)