Here we have two original occurrences of “to be vain” that were changed in the 1874 RLDS edition by adding the preposition in, giving “to be in vain” (which is what we expect in modern English). In these two instances, the 1908 RLDS edition restored the original reading without the in. As discussed under Jacob 7:24, the original text has instances of both forms, with and without the in. In each case, we follow the earliest reading, thus “to be vain” here in 3 Nephi 1:6, 8.
Summary: Accept in 3 Nephi 1:6, 8 the two instances of “to be vain”, the earliest reading; both “to be vain” and “to be in vain” are found in the Book of Mormon text.