Unfortunately, your area for San Francisco is 80% water. The more relevant data of land area is more like 60 km^2 for Manhattan and 120 km^2 for San Francisco.
Edit: as a result, your comparison to Pune is significantly inaccurate. Indeed, Pune is only some 25% more dense than San Francisco, not three times as you suggest. This is easiest to check by looking at the "population density" figure on Wikipedia, but it's consistent with doing the relevant calculations yourself. (I checked.)
You seem to be correct - the area number you get by googling does include water. My mistake. I guess the ultimate limit of SF might indeed be only 2x or 3x Manhattan (Manhattan could be considerably more dense than it is).
Nevertheless, I do stand by the claim that Pune has handled population and economic growth well by building more housing, and is likely to continue doing so.
Edit: as a result, your comparison to Pune is significantly inaccurate. Indeed, Pune is only some 25% more dense than San Francisco, not three times as you suggest. This is easiest to check by looking at the "population density" figure on Wikipedia, but it's consistent with doing the relevant calculations yourself. (I checked.)