How to measure bottom bracket size?
The dimension you need to match is B in your photo. The length of a BB axle doesn't include the threaded ends.
You also need to measure the shell on your bike, though it's probably 68 mm.
See Sheldon Brown for more details.
https://www.sheldonbrown.com/bbsize.html
So a fully specified cup-and-cone type BB would be something like 68x113, meaning it is intended for a bike with 68 mm shell and 113 mm long axle.
FYI: your replacement BB might have threaded holes in the ends of the axles, instead of male threads. (eg Shimano BB-UN26). You'll need bolts to go along with the new BB.