Here in the current text we twice have the clause “and this they did”. But in the first case, Oliver Cowdery initially wrote this in the original manuscript, then he corrected the this to thus by overwriting the original is with a heavily written u, which he then followed by writing the s inline, also with heavier ink flow but not quite as heavy as the ink flow for the u. Spacing between the finally written s and the following word, they, indicates that the change from this to thus took place before Oliver wrote the they. In other words, the correcting part of thus, despite being written with heavier ink flow, appears to be an immediate correction, not one done later. But when Oliver came to copy this part of the text from 𝓞 into 𝓟, he reverted to the this, which is what the 1830 compositor typeset. Joseph Smith, however, while editing the printer’s manuscript for the 1837 edition, initially changed the this to thus by overwriting the i with a u; then he changed his mind and restored the this (but only minimally, by adding just the dot of an i ). So there definitely appears to be some confusion here. But ultimately the text has settled on “and this they did” at the beginning of verse 18, in agreement with the second occurrence of “and this they did” in the middle of that verse (this second this is extant in 𝓞 and reads without correction).
It is possible that this second case of this later on in the passage may have influenced Oliver Cowdery in the first case to revert to this when he copied the text from 𝓞 into 𝓟; this second this may have also influenced Joseph Smith as he edited 𝓟 for the 1837 edition to restore the first this after he had initially replaced it with thus. On the other hand, it seems less likely that the second occurrence caused Oliver to initially write this for the first occurrence in 𝓞 since that correction seems immediate (despite the use of heavier ink flow for the correction). Moreover, there is some distance (almost two manuscript lines in 𝓞) between the two occurrences of “and thus/this they did”, so it is less likely that the first occurrence of “and this they did” in 𝓞 was an error in anticipation of the second “and this they did”.
Another possibility worth considering is that the second occurrence of “and this they did” could be an error for “and thus they did”. In other words, both times Oliver Cowdery incorrectly wrote “and this they did” but only in the first case did he catch the error and change it to “and thus they did”. To be sure, there is considerable evidence that Oliver and the other scribes had difficulty with this and thus, especially after and at the beginning of sentences. For a list of instances where the scribes incorrectly replaced thus with this, if only momentarily, see under Alma 11:21. Particularly relevant here is the fact that there are two clear examples in 𝓟 where Oliver Cowdery initially wrote “and this they did” instead of the correct “and thus they did” (although in these two cases the did is a helping verb rather than a main verb):
We therefore have some support for the tendency to replace thus with this in the phrase “and thus they did”.
Both readings, “and thus they did” and “and this they did”, occur elsewhere in the text, as exemplified by the following contrasting pair:
Note that in Alma 52:25, one could replace thus with this (“and this they did and slew all those”), or that in 3 Nephi 11:15 one could replace this with thus (“and thus they did do / going forth one by one”. In both instances, the critical text will follow the reading of the earliest textual sources, thus in Alma 52:25 and this in 3 Nephi 11:15. In the same way, the critical text will follow the earliest textual sources for determining thus and this in Alma 24:18: namely, thus for the first occurrence and this for the second:
There would have been no motivation for Oliver Cowdery to have emended his initial this to thus in 𝓞 (at the beginning of verse 18) except that the text read this way (that is, this was the text that Joseph Smith dictated to him).
Summary: Restore in Alma 24:18 the thus (the immediately corrected reading in 𝓞) at the beginning of the verse (“and thus they did / it being in their view a testimony”); later on in the verse, the use of this (the reading without correction in 𝓞) will be maintained (“and this they did / vouching and covenanting with God”).