Rarely will a second story addition work unless it is at least 800-1000sf…100sf is needed just for stairs…Then there may be a hallway needed up stairs…Plus what space is lost downstairs? Will you loose a bedroom for the stairway?
Extending out back if setback reqs are met is a no brainer …too many headaches associated with 2 story and 400 sq ft is too little. Creating a bedroom is nowhere close to what is needed for a bathroom as plumbing, electrical etc is needed. The national average cost of adding on a 100 sq ft spa like bathroom is $75k with bay area estimates going up to $150k ( labor + material). Until earlier in the year contractors just threw out numbers and you were lucky if they return your calls. Things have softened a bit now ! You should call around for estimates