The calculated distance (air line) between Terek and Makhachkala is approximately 173 miles respectively 278 kilometers.
By car or train, the actual journey to Makhachkala is certainly longer, as only the direct route (as the crow flies) between Terek and Makhachkala has been calculated here.
Air line (approximately)
278 kilometers
150 nautical miles