I can rewrite f(x)f(x) and g(x)g(x) as :-
f(x)={1,0,0≤x≤1∪−1≤x<0x>1∪x<−1f(x)={1,0≤x≤1∪−1≤x<00,x>1∪x<−1
g(x)={1,2,0≤x≤2∪−2≤x<0x>2∪x<−2g(x)={1,0≤x≤2∪−2≤x<02,x>2∪x<−2
Here, ff has jump discontinuity at ±1±1 and gg has jump discontinuity at ±2±2.
Now, For h1=f(g(x)),h1=f(g(x)),
f(−1≤g(x)≤1)=1f(−1≤g(x)≤1)=1 when −2≤x≤2−2≤x≤2
and f(g(x)>1∪g(x)<−1)=0f(g(x)>1∪g(x)<−1)=0 when x>2∪x<−2x>2∪x<−2
So, h1=f(g(x))h1=f(g(x)) has discontinuity at ±2±2
Now, For h2=g(f(x)),h2=g(f(x)),
g(−2≤f(x)≤2)=1g(−2≤f(x)≤2)=1 when −∞<x<∞−∞<x<∞
So, h2=g(f(x))h2=g(f(x)) is continuous everywhere.