Clear[f, k, c1, c2, ρ1, ρ2, u1, u2, u3, r, 
      g]
f[x_] := 
      If[5 ≤ x < 6, x - 5, 
        If[6 ≤ x <= 7, 7 - x, 0]]
ρ1 = 1
ρ2 = 1
c1 = 1
c2 = 1
κ = ((ρ2*c2)/(ρ1*c1))
r[x_] := (1/(1 + κ)) f[x]
u1[x_] := 
      If[(x ≥ 0 && (x - c1*t) >= 
              0), (1/2) (f[x + c1*t] + f[x - c1*t]), 
        0]
u2[x_] := 
      If[(x ≥ 0 && (x - c1*t) ≤ 
              0), (1/2) (f[x + c1*t] - f[-x + c1*t]) + 
          r[t - (x/c1)], 0]
u3[x_] := 
      If[(x ≤ 0 && (x + c2*t) ≥ 0), 
        r[t + (x/c2)], 0]
g[x_] := u1[x] + u2[x] + u3[x]
Table[
      Plot[g[x], {x, -13, 13}, 
        PlotRange -> {{-10, 10}, {-2, 2}}, 
        PlotStyle -> {RGBColor[1, 0.7, 0], Thickness[0.015]}, 
        AxesLabel -> {"x", "u(x,t)"}], {t, 0, 10, 
        0.1}]