As the title says, I've been trying to prove this:
$(\lnot A \to B) \vdash (\lnot B) \to A)$
but unfortunately keep winding up with crazy long steps and then I have no idea where to go. The only axioms I can use are: \begin{gather} A \to (B \to A), \tag{Ax1} \\[0.1in] \big(A \to (B \to C)\big) \to \big((A \to B) \to (A \to C)\big), \tag{Ax2} \\[0.1in] (\neg B \to \neg A) \to (A \to B), \tag{Ax3} \\[0.1in] A \to \neg (\neg A). \tag{Ax4} \end{gather} Any help would be greatly appreciated. I thought about doing $(\mathrm{Ax2})$ first to get the $B$ and $A$ rearranged, followed by $(\mathrm{Ax3})$, but then I got lost there.
Fact about axiomatic proofs: It's not just your problem, but Hilbert-style proofs tend to be much more puzzling and laborious then Gentzen-style ones. Presumably, a natural deduction experienced logician would have troubles to prove the same theorem he just proved in the latter system using the former (For instance, note that the shortest known proof in Mendelson's system $M$ of the (trivial?) '$A \wedge B \vdash A$' requires $-$ as far as I know $-$ over 50 lines! [§2.3]).
In a Hilbert-style proof is not difficult to "keep winding up with crazy long steps" until we get some insight of how should we proceed. But you started very well by trying to instantiate axiom schemas II and III and maybe you just get lost in the middle of the instantiation. Maybe you can try to proceed like this:
(1) We first observe that, by a simple instance of the axiom schema III we obtain:
Now we just need to figure out how to "eliminate" the inner double negations in B to get our result:
(2) Continuing our strategy, we can try to prove the following
so that we could just proceed by a simple hypothetical syllogism and get our result. This is what we will try to do in the following steps (we now continue the proof):
Now by hypothetical syllogism, 1 and 6 we have our desired result:
Work (almost) done: We have derived the result we wanted. We just need to add a proof the hypothetical syllogism. Now can you complete the work? (Which axioms schemas to instantiate?)