The algebraic problem in the equilibrium of weak acids and bases
This sort of derivation is a just painful, but straightforward. As Poutnik mentioned it is just a series of equations where you eliminate variables by substitution.
So start with the basics.

$\ce{HA &lt;=&gt; H+ + A-}\tag{A}$
$\ce{BOH &lt;=&gt; B+ + OH-}\tag{B}$
$\ce{H2O &lt;=&gt; H+ + OH-}\tag{C}$
Given:

$\mathrm{C_A}$ is the concentration of the HA reagent
$\mathrm{V_A}$ is the volume of the HA reagent added to the solution
$\mathrm{C_B}$ is the concentration of the BOH reagent
$\mathrm{V_A}$ is the volume of the BOH reagent added to the solution


So there are six unknowns: $\ce{[HA], [A-], [BOH], [B+], [H+]}$ and $\ce{[OH-]}$
Thus we need 6 independent equations to solve the problem.
Step 1
$\mathrm{K_a} = \dfrac{\ce{[H+][A-]}}{\ce{[HA]}}\tag{1-1}$
$\mathrm{K_b} = \dfrac{\ce{[B+][OH-]}}{\ce{[BOH]}}\tag{2-1}$
$\mathrm{K_w} = \ce{[H+][OH-]}\tag{3-1}$
$\ce{[H+] + [B+] = [OH-] + [A-]}\tag{4-1}$
$\ce{([HA] + [A-])\cdot \mathrm{(V_A + V_B)} = \mathrm{V_A\cdot C_A}}\tag{5-1}$
$\ce{([BOH] + [B+])\cdot \mathrm{(V_A + V_B)} = \mathrm{V_B\cdot C_B}}\tag{6-1}$
So now for the 6 equations just eliminate equations one at a time.
Step 2
So for example we want to know the final equation to only have the unknown $\ce{[H+]}$.  Rearrange equation (3-1) to:
$\ce{[OH-]} = \dfrac{\mathrm{K_w}}{\ce{[H+]}}\tag{3-2}$
Now in equations (1-1), (2-1), (4-1), (5-1), and (6-1) substitute for $\ce{[OH-]}$ and equation (3-1) is eliminated.  So now you're left with 5 equations and 5 unknowns.
$\mathrm{K_a} = \dfrac{\ce{[H+][A-]}}{\ce{[HA]}}\tag{1-2}$
$\mathrm{K_b} = \dfrac{\ce{[B+]\cdot \mathrm{K_w}}}{\ce{[BOH][H+]}}\tag{2-2}$
$\ce{[H+] + [B+] = \dfrac{\mathrm{K_w}}{\ce{[H+]}} + [A-]}\tag{4-2}$
$\ce{([HA] + [A-])\cdot \mathrm{(V_A + V_B)} = \mathrm{V_A\cdot C_A}}\tag{5-2}$
$\ce{([BOH] + [B+])\cdot \mathrm{(V_A + V_B)} = \mathrm{V_B\cdot C_B}}\tag{6-2}$
Obviously as you continue it gets more and more tedious, but the process is straightforward.

The point is that you have 6 unknowns and 7 equations below. So all of the equations can't be independent. With a problem that is going to be this tedious I like to write out everything explicitly so that:
(1) I don't get confused
(2) So that I can check my work step by step.