You can add the studs right next to the ones that is rotted, but, take the rotted ones out, once you DO put the new ones in. (If not the rot will spread to the good wood and you will be in the same boat as you are now).
Prime the entire surrounding area, if its got a chance to get wet...Maybe slap some poly on it, a few coats too.
Now, WHY it got wet, is something you should REALLY address! Because if it happens again, it could rot the sill plate, (if it already hasnt, so check that too), and create all kinds of mold in your bathroom and that could be a hazard for the entire family!)...
You "didnt" build the shower, using the outside walls as your shower wall, did you? huh? (I pray that you didnt
)... Or, was this an already build in thing that happened to have the base rotted out from constant useage? That happens for the old tin ones, though they do last many years, the shower pans really werent made for it, but, until they gave out, who would know, right? (Though the rust is a dead give away on that part).
Ok, dont sister or marry them to the others, put them down after checking to make sure there isnt any rot to the sill plate, (take a knife and pry underneath and see if you can get it in there, if you can, its rotted too and has to be taken out)....
Just my take, others will have an opinion, I'm sure...(probaby a better one too!)..