When the first bit reaches the host B, which bit is exit from the host A?
Each bit between sender and receiver is delayed by the propagation delay - the time it takes to travel the medium.
The rest is pure physics, time = distance / velocity. Since you've got time * bitrate bits on the cable, that's the distance in bits.
Interestingly enough, this bandwidth-delay product is the amount of data that needs to be 'in flight' to saturate the bandwidth of a connection, when acknowledgement is required. With the TCP transport-layer protocol, this is controlled by the receive window.