Well the first calculation for surface area is obviously false as that's clearly calculating the volume and doubling it.
The second formula appears to be calculating the inverse surface area.
w=width, h=height, d=depth
= 2 * (wh + wd + hd)
Inv. surface area
= 1 / (2 * (wh + wd + hd))
= 0.5 / (wh + wd + hd)
The inverse surface area is more useful as you can just multiply by it to divide by the surface area. As you should know, dividing is quite significantly more expensive than multiplying, so you'll often see people storing inverses for performance reasons.