intention vs. purpose
Solution 1:
'With the purpose' implies that the thing you are doing is contributing to your goal. 'With the intention' only implies that you had another goal in mind. The action doesn't have to contribute to it.
So you can say
I went for a walk with the intention of finishing my studies later.
The walk doesn't contribute to the studies, so you could not substitute ' purpose' for 'intention'. If ' purpose' is correct you can usually substitute 'Intention'.