The calculated distance (air line) between Rancagua and Buin is approximately 30 miles respectively 49 kilometers.
By car or train, the actual journey to Buin is certainly longer, as only the direct route (as the crow flies) between Rancagua and Buin has been calculated here.