Clear[r, f]
a = 1
ω = 1
r[x_] := ((2*a)/(3*ω)) (Cos[ω*x] - 
            1)
u2[x_] := 
      If[(x ≥ 0 && (x - 2*t) ≤ 0), 
        r[((-x + 2*t)/2)], 0]
u3[x_] := 
      If[(x ≤ 0 && (x + t) ≥ 0), r[x + t], 
        0]
g[x_] := u2[x] + u3[x]
Table[
      Plot[g[x], {x, -20, 20}, 
        PlotRange -> {{-20, 20}, {-2, 2}}, 
        PlotStyle -> {RGBColor[1, 0.7, 0], Thickness[0.015]}], {t, 0, 
        20, 0.1}]