I don't know if it helps, but you can compose the representation of $\langle a, b \rangle \to \langle A,B \rangle$ with reduction (mod $q$) for any prime $q >5$, and you get a free kernel $K_{q}$ of $\langle a,b \rangle$ whose rank you can calculate with the Euler characteristics of CTC Wall. But you still have to figure out what $p(K_{q})$ looks like inside $\langle A,B \rangle$.