Shouldn't that be "add 1/p to x"? Otherwise you induce drift and the mean hitting time will no longer be infinite.
Nah, dooglus' model is a random walk starting at the origin where you step left (winning a bet) with probability 1-p and step right (losing a bet) with probability p. The walk ends if you end up 1 step left of the origin (= you won a roll at your base bet, at which point the strategy resets) or if you end up at N steps left of the origin (you've busted).
I should have read your example a bit more closely. Anyway, I don't have an analytical solution, but there are examples online somewhere. It
is a Markov chain thing.
You can use the inverse gaussian distribution make an continuous approximation model, which is what I've done when I've modelled "busting times" in the past - it agrees quite well with simulations.