You can always do a replacement that produces a bigger value, when finding a big O bound. For example, consider:
i = 1
while i < n {
for j in (0..i) {
print j
}
i = i * 2
}
We can note that the running time of print j is 1. The for loop runs i times, which means it takes i steps. Then i = i * 2 takes some constant number of steps, so we have i + 1 steps inside the while loop. We know that i < n, so we can substitute a larger value, n+1, for the number of steps inside the loop. Then, the loop runs log_2 (n) times, which means we have (n+1)*log_2(n) performance, i.e. our algorithm is O(n*log n).
And this is
true. The algorithm I showed
is O(n*log n). It's also O(n*n) and O(n*n*n).
If we wanted to know the
tightest upper bound, we couldn't indiscriminately replace "i+1" with a larger number of steps, though. The running time of the algorithm above is O(n).
So regarding your question about whether you can perform that replacement: Yes, you can perform the replacement.
I don't think it's the place you'd want to perform the replacement, though. You can evaluate that expression easily: The expression inside the sum doesn't reference the iteration variable at all, so Sum(from i = 0 to j)(T0(n)+5) = (j+1)*(T0(n)+5) = (j+1)*(5n+12).
Then you can say T1(n) <= (n+1)*(5n+12); T1(n) is O(n^2).
I really wish you'd use <= when you mean an inequality, or else you'll be thinking in terms of substitutions and how to plug and chug a solution, rather than the facts you are writing on paper.