If you don't substitute back, you have to change the limits as soon as you make the substitution.
And for further clearification, you can write . It would avoid careless mistakes
What you got should be corrected this way :
If you want to include the limits, let f(z) be the right hand side of the equation and the solution is