I may have given too general an answer, and I assumed that you were using 'hub' to mean 'switch'. There are different rules for hubs/repeaters than for switches/bridges. In a practical sense, hubs/repeaters are almost never used anymore, switches/bridges are used instead. That being said, an academic understanding of shared-media Ethernet is actually helpful for a deeper understanding of networking. (all the timing rules related to collision detection and preamble consumption, and all the details that I no longer remember)
That being said, even assuming shared-media Ethernet (hubs/repeaters), if you have two computers with one network cable directly connecting them, that is 1 segment with 2 stations on it, and 100 meters is correct.
In your ping example, the frame containing the ping travels from Computer1 across the cable to Computer2, and is consumed. Computer2 then drops a reply frame on the cable, it travels back to Computer1 and is consumed. This is assuming twisted-pair. If you have a coax network (obsolete, but academically interesting) the frames are not consumed by the stations, but are instead consumed (literally converted to a tiny amount of heat) in the terminating resistors at each end of the coax cable. The frame containing the ping doesn't just 'bounce' off the target computer - it is actively responded to.
I don't know if I made it better of worse for you with my explanation, but I hope I helped.