The scenes are meant as an analogy to one’s progress in meditation.
Thus one starts off by looking for some sort of advanced state of mind (= the ox). Then one grapples with the unruly mind in meditation (overpowering the ox).
One then tames the mind (= the ox), and can sit peacefully in meditation (riding the ox home).