ClearAll[f, tangent]
f[x_] := 1 - 2 x + x^2;
tangent[x_, a_] := f[a] + f'[a] (x - a)
Manipulate[Plot[{f[x], tangent[x, t], tangent[x, t + 0.1]}, {x, 0, 4},
Mesh -> {{t}}, MeshStyle -> Directive[Red, PointSize[Large]],
PlotRange -> {{0, 5}, {-5, 10}}], {{t, 2.5, "time"}, 0, 4, 0.05}]