the average of a dataset is simply the "arithmetic mean", and is just the sum of the data items divided by how many items are there.
well, in this case we have 3 items, 2, 3 and (x-1), so, to get their average, we sum them up and divide them by 3, but we already know that's n, well
[tex] \bf \cfrac{2+3+(x-1)}{3}=n\implies \cfrac{2+3+x-1}{3}=n\implies \cfrac{4+x}{3}=n
\\\\\\
4+x=3n\implies x=\cfrac{3n}{4} [/tex]