For the noun phrase second leader, the original manuscript here reads “the second leader”. The determiner the occurs at the end of a line in 𝓞. When copying from 𝓞 into 𝓟, Oliver Cowdery let his eye skip too quickly to the next line in 𝓞, and he ended up writing the indefinite article a in 𝓟 rather than the the. There is only one “second leader over the whole army”, as is shown a few verses later:
Obviously, this process of succession would not have worked in an automatic fashion (as implied by the narrative here in Alma 47) if there had been more than one “second leader”. There is no indication that Amalickiah needed to compete in any way to become the first leader after the death of Lehonti.
Summary: Restore in Alma 47:13 the definite article the before second leader (“the second leader over the whole army”); the narrative later in Alma 47:17 shows there is only one second leader.