How come in this phrase "va a estudiar ella en la biblioteca hoy?" has ella AFTER the word estudiar? Couldn't I just put 'ella' before va as well, like as in "ella va a estudiar en la biblioteca hoy?"

I know spanish is flexible so I was wondering if it is grammatically correct to write it the second way, and I also want to know WHY "ella" was put after the action.