Mirza grew up and completed his schooling in Bombay, attending the Elphinstone College of the University of Bombay, but left the university to attend the Royal Military Academy in Sandhurst when he was selected by the British Governor-General for the King's Commission. Mirza was the first Indian graduate of the military academy, and gained his commission in the British Indian Army as 2nd Lt. on 16 July 1920. As was customary for newly commissioned British Indian Army officers, he was initially attached for a year to the second battalion of the Cameronians (Scottish Rifles). On 16 July 1921, he was promoted to lieutenant and was assigned to command a platoon on 30 December 1921.  His military career was spent in the Military Police. In spite of hailing from Bengal, his military career was mostly spent in the violent Western region of India, participating in the Waziristan war in 1920. After the campaign, he was transferred to the 17th Poona Horse (Queen Victoria's Own), as an army inspector but left active service to join the Indian Political Service (IPS) on August 1926. His first assignment was posted in Aligarh in Uttar Pradesh as an assistant commissioner before posting as political agent in Hazara in the North West Frontier Province. He received promotion to army captain on 17 October 1927.  From 1928-33, Mirza spent time as political agent in the troubled Tribal belt, having served as an assistant commissioner in the districts of Dera Ismail Khan on April 1928, Tonk on May 1928, Bannu on April 1930, and Nowshera on April 1931. In 1931, Captain Mirza was appointed a district officer and later posted as deputy commissioner at Hazara in May 1933, where he served for three years until a posting to Mardan as assistant commissioner from October 1936 (deputy commissioner from January 1937). Promoted to major on 16 July 1938, he became the political agent of the Tribal Belt in April 1938, stationed at Khyber. He remained there until 1945.  Mirza was appointed and served as the political agent of Odisha and North West Frontier Province from 1945 until 1946. He was promoted to Lieutenant-Colonel on 16 July 1946. His ability to run the colonial administrative units had brought him to a prominence that prompted the British Indian Government to appoint him as the Joint Defence Secretary of India in 1946. In this position, he was responsible for dividing the British Indian Army into the future armies of Pakistan and India. Around this time, he became closer to Liaquat Ali Khan and began formatting political relations with the politicians of the Muslim League.

Answer this question "what did he study there" by extracting the answer from the text above.
but left the university to attend the Royal Military Academy in Sandhurst when he was selected by the British Governor