may be
ClearAll[x, f]; f[x_] := (x - 4) (x - 8) (x); {y, x0} = FindMaximum[f[x], {x, 0, 9}]; Show[Plot[f[x], {x, 0, 9}], Plot[f[x], {x, 0, x /. x0}, PlotStyle -> {Thick, Red}]]
Almost! The graph is not as important, the important thing is the value that I want no to obtain near de critical point, for example in your reply in FindMaxium you put limits from 0 to 9 , the 0 is ok, but instead of 9 I want that the evaluation stops when f (x + dx )< f(x) , where dx is a small increment that I chose.