Update:
Before we start, it has to be clear that two integrals $H$ and $I_B$ are independent and that they commute, i.e. $\{H, I_B\} = 0$ for all of what follows to work. The latter zero Poisson bracket guarantees that the main integral below integrate to a function $S$, i.e. the differential is exact, it is the derivative of a function.
At some point you say that $I_B = p_2$, but this is not true for a general system. Usually, $I_B$ is some more convoluted function of $p$ and $q$. The case when $I_B = p_2$ is a constant of motion, i.e. a first integral, is very special. It means that $\frac{d}{dt} \, p_2 = 0$ and so if you write it carefully, using the corresponding Hamilton's equation:
$$0 = \frac{d}{dt} \, p_2 = - \,\frac{\partial H}{\partial q_2}\big(q_1, q_2, p_1, p_2\big) $$
which means $H = H\big(q_1, p_1, p_2\big)$ and does not depend on $q_2$ (the coordinate $q_2$ is called cyclic coordinate).
Thus $$I_A = H\big(q_1, p_1, p_2\big)$$ $$I_B = p_2$$
So the equations of motion are
$$\frac{d}{dt} \, q_1 = \frac{\partial H}{\partial p_1}\big(q_1, p_1, p_2\big)$$
$$\frac{d}{dt} \, q_2 = \frac{\partial H}{\partial p_2}\big(q_1, p_1, p_2\big)$$
$$\frac{d}{dt} \, p_1 = - \, \frac{\partial H}{\partial q_1}\big(q_1, p_1, p_2\big)$$
$$\frac{d}{dt} \, p_2 = 0$$
In this case we solve the equation $$H(q_1, p_1, I_B) = I_A$$ and express $p_1$ as a function
$$p_1 = p_1\big(I_A, I_B, q_1\big)$$
The so called generating function in this case looks like this, where there is one integral of one variable
$$S\big(I_A, I_B, {q}_1, {q}_2\big) = \,I_B \, q_2 \, + \, \int_{q^{0}_1}^{q_1}\, p_1\big(I_A, I_B, \tilde{q}_1\big)\, d\tilde{q}_1$$
So the main task is to solve the equation (invert the integral) for $q_1$, where $\phi_A$ is an initial value constant:
$$\phi_A + t = -
\, \int_{q^{0}_1}^{q_1}\, \frac{\partial p_1}{\partial I_A}\big(I_A, I_B, \tilde{q}_1\big)\, d\tilde{q}_1$$
in order to express $q_1 = q_1(t)$ as a function in $t$ and then plug in the integral
$$q_2(t) = - \,\phi_B \, -
\, \int_{q^{0}_1}^{q_1(t)}\, \frac{\partial p_1}{\partial I_B}\big(I_A, I_B, \tilde{q}_1\big)\, d\tilde{q}_1$$
Terminology remark: Technically speaking, your coordinate transformation $$\big(q_1, q_2, p_1, p_2\big) \mapsto \big(\phi_A, \phi_B, I_A, I_B\big)$$ is canonical, and your conclusions are true, but these coordinates $(\phi_A, \phi_B, I_A, I_B)$ are not exactly action-angle coordinates. Action-angle coordinates are a bit more special, but the ones you speak about are close to them and work too.
It looks like you got the general picture right. Things are as your calculations show. What probably confuses you is how come the system is so trivial and easy to solve when written in the new coordinates. Well, just be aware that constructing the coordinates $\phi_A = \phi_A(q_1, q_2, p_1, p_2)$ and $\phi_B = \phi_B(q_1, q_2, p_1, p_2)$ takes work solving a system of equations and inverting possibly complicated integrals
Step 1. Solve the system of equations for the variables $p_1, \, p_2$
\begin{align}
&I_A\big(q_1, q_2, p_1, p_2\big) = I_A\\
&I_B\big(q_1, q_2, p_1, p_2\big) = I_B
\end{align}
expressing them as functions
\begin{align}
&p_1 = p_1\big(I_A, I_B, q_1, q_2\big)\\
&p_2 = p_2\big(I_A, I_B, q_1, q_2\big)
\end{align}
Step 2. Consider the function $S$, via integration
$$S\big(I_A, I_B, {q}_1, {q}_2\big) = \int_{(q^{0}_1, q^{0}_2)}^{(q_1, q_2)}\, p_1\big(I_A, I_B, \tilde{q}_1, \tilde{q}_2\big)\, d\tilde{q}_1 \, + \,p_2\big(I_A, I_B, \tilde{q}_1, \tilde{q}_2\big) \,d\tilde{q}_2$$ where the integration is along any path (up to homotopy, whatever that means) on the $q_1, \, q_2$ plane, connecting a fixed point $(q^{0}_1, q^{0}_2)$ to any other point $(q_1, q_2)$. Think of this as an indefinite integral.
Step 3. Since the canonical change of variables is in solving the system of equations
\begin{align}
&\phi_A = - \,\frac{\partial S}{\partial I_A}\big(I_A, I_B, q_1, q_2\big)\\
&\phi_B = -\,\frac{\partial S}{\partial I_B}\big(I_A, I_B, q_1, q_2\big)\\
&p_1 = \, \frac{\partial S}{\partial q_1}\big(I_A, I_B, q_1, q_2\big)\\
&p_2 = \,\frac{\partial S}{\partial q_2}\big(I_A, I_B, q_1, q_2\big)
\end{align}
the solutions are obtained by solving the system of equations for the variables $\big(q_1, q_2\big)$
\begin{align}
&\phi_A + t = - \,\frac{\partial S}{\partial I_A}\big(I_A, I_B, q_1, q_2\big)\\
&\phi_B = -\,\frac{\partial S}{\partial I_B}\big(I_A, I_B, q_1, q_2\big)\\
\end{align}
and then plugging the solutions $q_1 = q_1(t)$ and $q_2 = q_2(t)$ into
\begin{align}
&p_1 = \, \frac{\partial S}{\partial q_1}\big(I_A, I_B, q_1, q_2\big)\\
&p_2 = \,\frac{\partial S}{\partial q_2}\big(I_A, I_B, q_1, q_2\big)
\end{align}
The first system of equations is the same as system of integrals (this is what is meant by inverting the integrals)
\begin{align}
&\phi_A + t = -\int_{(q^{0}_1, q^{0}_2)}^{(q_1, q_2)}\,\frac{\partial p_1}{\partial I_A}\big(I_A, I_B, \tilde{q}_1, \tilde{q}_2\big)\, d\tilde{q}_1 \, + \,\frac{\partial p_1}{\partial I_A}\big(I_A, I_B, \tilde{q}_1, \tilde{q}_2\big)\, d\tilde{q}_2\\
&\phi_B \, = -\int_{(q^{0}_1, q^{0}_2)}^{(q_1, q_2)}\,\frac{\partial p_1}{\partial I_A}\big(I_A, I_B, \tilde{q}_1, \tilde{q}_2\big)\, d\tilde{q}_1 \, + \,\frac{\partial p_1}{\partial I_B}\big(I_A, I_B, \tilde{q}_1, \tilde{q}_2\big)\, d\tilde{q}_2
\end{align}
and then the solutions $q_1 = q_1(t)$ and $q_2 = q_2(t)$ are plugged into the integrals
\begin{align}
&p_1 = \,\int_{(q^{0}_1, q^{0}_2)}^{(q_1, q_2)}\,\frac{\partial p_1}{\partial \tilde{q}_1}\big(I_A, I_B, \tilde{q}_1, \tilde{q}_2\big)\, d\tilde{q}_1 \, + \,\frac{\partial p_1}{\partial \tilde{q}_1}\big(I_A, I_B, \tilde{q}_1, \tilde{q}_2\big)\, d\tilde{q}_2\\
&p_2 = \,\int_{(q^{0}_1, q^{0}_2)}^{(q_1, q_2)}\,\frac{\partial p_1}{\partial \tilde{q}_2}\big(I_A, I_B, \tilde{q}_1, \tilde{q}_2\big)\, d\tilde{q}_1 \, + \,\frac{\partial p_1}{\partial \tilde{q}_2}\big(I_A, I_B, \tilde{q}_1, \tilde{q}_2\big)\, d\tilde{q}_2
\end{align}
So there is work to be done.