What's the problem this logic
Solution 1:
Of course $A$ and $B$ implies $Z$! That's not in question. But how do we get from the premisses $A$ and $B$ to the conclusion $Z$?
To avoid distracting clutter for a moment, let's change the example for a bit and consider
$(A')\quad p$
and
$(B')\quad p \to q.$
where $\to$ is some conditional. These evidently imply
$(Z')\quad q.$
But again, how and why? One thing to say is: because we can invoke a principle of inference, a permissive rule that says
(MP) From $C$ and $C \to D$, you can infer $D$.
That inference rule is of course the Modus Ponens rule. And the point of Lewis Carroll's 'What the Tortoise Said to Achilles' is to show us vividly that we can't here replace the rule by a proposition such as
$(C') \quad (p \wedge (p \to q)) \to q.$
to serve as a third premiss. For if we just accept this as a new premiss, we'll just have a list of three premisses, and will still need a permissive rule to allow us to get anywhere from them, e.g. the rule
From $C$ and $C \to D$ and $(C \wedge (C \to D)) \to D$, you can infer $D$.
Can we avoid appeal to that rule by instead accepting the proposition
$(D') \quad[(p \wedge (p \to q) \wedge (p \wedge (p \to q)) \to q] \to q?$
as a new premiss. Of course not. To get to $q$ from $A', B', C', D'$ we'd need to invoke another rule! So we really, really, don't want to start down this regress!
In sum: we can't replace the modus ponens rule by a proposition such as $(C')$. Of course, $(C')$ is true, and the rule and the truth are intimately connected: that's why we might get confused here. But at some point, to get anywhere in a deduction, we need rules of inference like (MP), not just more premisses.
Likewise for Carroll's original example: how do we infer the original $Z$ from $A$ and $B$? We could add further propositional assumptions if we want, but at some point we have to appeal to a rule of inference. That's the moral that is being driven home.
(Of course, the rule/proposition distinction Carroll is driving at is built into every system of baby logic that beginners encounter, so -- looked at one way -- it can seem now that he is fussing about nothing. But looked at another way, this point explains why that fundamental distinction is compulsory.)
Solution 2:
There are two levels we can look at this on:
First you can say that the reason why the exchange seems to make sense is that it is based on a formal fallacy, namely the thought that stating that inference rule $(P\to Q), P \vdash Q$ is the same as claiming the formula $((P\to Q)\land P) \to Q$ as an axiom. As Peter Smith explains, the difference between these two things is crucial, at least until you have established (while carefully observing the difference) in which situations it is okay to pass from one to another.
Second, however, one can choose to ignore these formal issues and instead hold the point of the dialogue to be:
T: Yes, the rules of logic say I must now accept Z. But who says I need to follow the rules of logic?
A: Okay, new rule: You have to follow the rules we've already set up.
T: Very well, but who says I have to follow that rule? What if I just deny it?
A: Hmm, okay, new new rule: You also have to follow the rule from before.
T: But then --
A: I see where you're going here. I'll take it all back and just have one new rule, which says: You have to follow all the rules of logic including this one.
T: Still not good enough. If I were obliged to follow your new rule, it would indeed tell me that it itself had to be followed. But as long as I reject the rule, you can't argue that I'm doing anything wrong, because the only rule that says I have to follow it is one I'm not yet convinced applies to me.
In this light, the point is that we cannot establish the necessary validity of the rules of logic simply by stating more rules. No matter how far we go, eventually we follow the rules not because anything forces us to, but because those rules happen to be the rules of the game we choose to play.
Over the centuries, philosophers have produced some interesting attempts to explain why and how people seem to choose to play the same (or at least similar) games most of the time. Lately, cognitive science has begun approaching the problem from a somewhat different angle. Modern mathematics, on the other hand, tries to keep out of that trouble entirely. By and large it concerns itself only with what happens once you have decided, for whatever reason, to play the game at all.
(Note, however, that the boundary between "philosophy" and "mathematics" looked quite different when Carroll wrote from what it does today. The move of logic from being the exclusive province of philosophy to something that is also a branch of mathematics took most of the 19th century to happen).
Solution 3:
My guess is, Carroll was poking fun at philosophers of the day. If they can have meta-logic, why not meta-meta-logic and so on? There is, of course, no need for a meta-analysis in this case.
$A$ is equivalent to the principle of the transitivity of equality: For all $x$, $y$ and $z$, if $x=z$ and $y=z$, then $x=y$.
$B$ and $Z$ are just an application of this principle.
$B$ states that we have a triangle, say, $\bigtriangleup PQR$ such that $|PQ|=z$ and $|PR|=z$.
$Z$ states that $|PQ|=|PR|$.
The "for all" construct allows us to make this substitution. Universal specification and detachment (modus ponens) are the only rules of logic that we need to invoke in this case.