real analysis – If $f$ is integrable on $[a,b]$ and $g$ is a function on $[a,b]$ . Show $g$ is integrable and $int_a^b f(x) = int_a^b g(x)$.

Problem:

If $f$ is integrable on $(a,b)$ and $g$ is a function on $(a,b))$ so that $f(x) = g(x)$ except for finitely many $x in (a,b)$. Show $g$ is integrable and $int_a^b f(x) = int_a^b g(x)$.

I have looked at the solution from this page.

Where they use induction to prove this, such as this: enter image description here

However my question is how do they arrive at $$t_k – t_{k-1}= frac{epsilon}{12B}$$
and $$|U(g,p) – U(f,p)| le 2(B-(-B))*max { t_k – t_{k-1}} < frac{epsilon}{3} $$

Thank you very much.