A ranch hand herded his cattle to some grazing land. Then he began riding back to the ranch, which is due west, at 7 kilometers per hour. Simultaneously, the cows began moving away from him, too, headed due east at 2 kilometers per hour. How long did it take for the herd and the ranch hand to be 4 kilometers apart?