Please help. I came across this line and I don't really understand use of と here. How exactly does と work here?
You may be reading too much into this; It is pretty simple.
Verb A + ようと + Verb B = "do B" so as to / in order to / for the purpose of "do A".
A is your goal / purpose. B is the method you are taking to achieve A.
"I extend my arm to the unfinished (glass of) orange juice so as to relax myself for now."