This is quite an old sense of 'study to' - in Br Eng, at least. The meanings you give are both appropriate - the point is that 'studying to do something' involves focus and mental effort (not necessarily 'studying' though, in the everyday sense). The nearest I can think of is 'Make your mind up to do X, and keep trying'. But as I said, it's uncommon - you'll mainly meet it in old documents. How old was the book you found it in? - and don't be fooled by the latest date of reprinting; in some parts of the world early 20th century 'English Grammars' are still in print (hence, partly, the tendency of English in what is still called - in the publishing world - 'the traditional British Empire' to be conservative [sticking to old 'rules', that is]).
Student or Learner