He studied classics at the University of Aberdeen, graduating with a Master's degree in 1876. He then attended the Free Church Divinity College in Aberdeen in preparation for ordination as a Free Church minister.
This passage describes someone who studied classics at the University of Aberdeen, obtained a Master's degree, and subsequently prepared for ministry by attending the Free Church Divinity College in Aberdeen. This was to enable him to become ordained as a Free Church minister.