On your current stack, ssh in and at the config prompt, enter:
stack unit 2 provision S50V
stack-unit 3 provision S50V
the number is the number of the switch you’re introducing, and the S50V is the model of the switch, you can use S25N, S25P, S25V, S50N, and S50V.
On your new switch make sure you renumber the thing at the enable prompt like this:
stack-unit 0 renumber 2
stack-unit 1 renumber 3
Make sure you write out your config file!