The calculated distance (air line) between Shahr-e Bābak and Bāfq is approximately 104 miles respectively 168 kilometers.
By car or train, the actual journey to Bāfq is certainly longer, as only the direct route (as the crow flies) between Shahr-e Bābak and Bāfq has been calculated here.
Air line (approximately)
168 kilometers
90 nautical miles