I need to prove the following statement:
Given a $U_h(f)$ which is an approximation with a composite quadrature of an integral $I(f)$, with $h$ being the length of the subintervals and a ratio of convergence $O(h^k)$. Then
$$\frac{U_{h}(f)-U_{h/b^2}(f)}{U_{h/b^2}(f)-U_{h/b^4}(f)} \approx b^k$$
is true.
I'm pretty lost here. I don't know how what kind of information does $O(h^k)$ gives to help prove the statement. Or if I would decompose the left hand side to get to the right hand side. Thanks for the help.
In reality, you do not have enough information to make any progress towards your goal. You need a stronger assumption. Specifically, there must exists an asymptotic error expansion of the form $$I(f) - U_h(f) = \alpha h^k + O(h^q), \quad h \rightarrow 0, \quad h > 0$$ where $\alpha \not = 0$ is a constant independent of $h$ and $0 < k < q$. Now let $\rho>0$. By replacing $h$ with $\rho h$ we have $$I - U_{\rho h} = \alpha \rho^k h^k + O(h^q),\quad h \rightarrow 0, \quad h > 0.$$ It follows that $$U_h - U_{\rho h} = \alpha(\rho^k - 1)h^k + O(h^q), \quad h\rightarrow 0, \quad h > 0.$$ By once again replacing $h$ with $\rho h$ we have $$ U_{\rho h} - U_{\rho^2h} = \alpha (\rho^k-1) \rho^k h^k + O(h^q), \quad h\rightarrow 0, \quad h > 0.$$ It follows that $$ \frac{U_h - U_{\rho h}}{U_{\rho h} - U_{\rho^2h}} = \frac{\alpha(\rho^k - 1)h^k + O(h^q)}{\alpha (\rho^k-1) \rho^k h^k + O(h^q)} = \frac{1 + O(h^{q-k})}{\rho^k + O(h^{q-k})} \approx \rho^{-k}$$ A common choice of $\rho$ is $\rho = \frac{1}{2}$ which corresponds to halving the length of each subinterval. This allows us to recycle the function values that have already been computed. In this case $$ \frac{U_h - U_{h/2}}{U_{h/2} - U_{h/4}} \approx 2^k.$$ Your left-hand side corresponds to the choice of $\rho = b^{-2}$ and your right-hand side should have been $b^{2k}$ rather than $b^k$ but this is not a serious issue.
In the case of the trapezoidal rule and a sufficiently smooth integrand the existence of a suitable asymptotic error expansion follows from the Euler-Maclaurian summation formula and $$(k,q) = (2,4).$$ If the integrand is not smooth, then you may still have an asymptotic error expansion, but the exponents $k$ and $q$ are not necessarily integers. Be mindful of the fact that you will never see the numbers $U_h$, only the computed value $\hat{U}_h$ which is affected by rounding errors and subtractive cancellation is an issue when computing $U_h - U_{\rho h}$ for small values of $h$. It is possible to say substantially more about the behavior of your fraction and the impact of rounding errors, but that is is outside the scope of your question.