You can't use the same equation for the second part as you did for the first. You have a reaction that is first order in two reagents, i.e.
Rate = k[A][B ]
Now in the first case, the initial concentrations of A and B are the same, and as they react in a 1:1 ratio, [A] = [B ] throughout the reaction. In that case you can write
Rate = k[A]2
and that is where your integrated equation comes from. In the second case the initial concentrations are different, and [A] ≠ [B ] throughout, so you can't use that equation. You have to use the integrated form for the true rate equation above.