In 'Scholium 1.3.5' in Sketches of an Elephant, Johnstone claims that if a category has finite limits, reflexive coequalisers and regular epimorphisms are stable under pullback, then it is regular. It says you can mimic the proof in 1.3.4, except I think there is a point where you cannot mimic this proof (when you compose two covers to get a cover, but this may not be true for regular epimorphisms). The proof would go as follows: Let $(a,b):P \to A$ be the kernel pair of a morphism $f:A \to B$, and let $i:A \to I$ be their coequaliser, and $m: I \to B$ the factorisation of $f$ through $i$. If we show $m$ is monic, we have successfully mimicked the proof, and the result will follow from that. Therefore let $x,y:C \to I$ be such that $mx=my$. We then have that the pullback of $(x,y): C \to I^2$ against $i\times i $ will yield morphisms $(p,q):Q \to C$ and $r :Q \to I$. The statement then follows from the fact that $r$ is epic. In 1.3.4 this is proven since $i\times1$ and $1\times i$ are pullbacks of $i$ and since $i$ is a cover, they are covers and so $i\times i$ is since it is the composite of two covers. In the case of 1.3.5, we see that $i\times1$ and $1\times i$ are both regular by a similar proof, but cannot conclude that their composite is therefore regular. Since we only know that regular epics are stable under pullback, we cannot proceed with the proof.
Does the fact that regular epics are stable under pullback imply somehow that the composite of these two morphisms is still regular. I have tried to exhibit $i\times i$ as a pullback, but haven't been successful. The main application of this result is showing that locally Cartesian closed categories are regular, and in that case since epics will be stable under pullback, one can then proceed with the proof, but I'm wondering how the proof of this Scholium aims to proceed. This is not related to general questions of whether the composition of regular epimorphisms are regular. I'm aware they're not in general regular, but Johnstone claims they are in this case so I want to know why.
Proposition 5.10. of Monomorphisms, Epimorphisms, and Pull-backs by Kelly says that $fg$ is a regular epimorphism if $f$ and $g$ are regular epimorphisms and pullbacks of $g$ are epimorphisms. So the answer to your question is yes.
The idea underlying the proof of that proposition can also fill directly the gap in the Scholium. The key is to use the kernel pair morphisms $x,y\colon K[m]\rightrightarrows I$ instead of arbitrary $x,y\colon C\rightrightarrows I$. Then $p,q\colon Q\to A\times A$ is the kernel pair of $f=mi$, as can be seen via the diagram realizing kernel pairs as pullbacks of a diagonal: $$\require{AMScd} \begin{CD} K[mi]@>r>>K[m]@>>>B\\ @VV(p,q)V@VV(x,y)V@VV\Delta V\\ A\times A@>>i\times i>I\times I@>>m\times m>B\times B \end{CD}$$ To show $r$ is an epimorphism, consider instead the commutative diagram realizing kernel pairs as pullbacks of a morphism along itself: $$\require{AMScd} \begin{CD} K[mi]@>>>\bullet@>>>A\\ @VVV@VVV@VViV\\ \bullet@>>>K[m]@>>y>I\\ @VVV @VVxV @VVmV\\ A@>>i>I@>>m>B \end{CD}$$ Evidently, $r\colon K[mi]\to K[m]$ is the diagonal morphism in the top left square and is the composite of pullbacks of $i$. Thus, it is an epimorphism if those pullbacks of $i$ are epimorphisms.
The rest of the proof of the Scholium rests on the composites $K[mi]\overset r\to K[m]\overset x{\underset y\rightrightarrows}I$ being the same as $K[mi]\overset p{\underset q\rightrightarrows} A\overset i\to I$, which coincide if $i$ is the coequalizer of the kernel pair of $f=mi$, whence $x=y$ and $m$ is a monomorphism.
For the proof of Kelly's Proposition 5.10, suppose $i$ and $m$ are regular epimorphisms and the pullbacks of $i$ are epimorphisms. Then any $k$ coequalizing the kernel pair $p,q\colon K[mi]\rightrightarrows A$ also coequalizes the kernel pair of $i$ ($ia=ib$ implies $mia=mib$ implies $ka=kb$), whence $k=ni$ for a unique morphism $n$. But then $nxr=nip=kp=kq=niq=nyr$, whence $nx=ny$ since $r$ is an epimorphism, and so $n$ factors uniquely through $m$, whence $k=ni$ factors uniquely through $mi$. Thus $mi$ is the coequalizer of its kernel pair, i.e. the composite $mi$ is a regular epimorphism.