Derive transfer function from block diagram
My way of solving this would be to start at q and work down to phi_o1.
Define a new variable for each of the points where the signal gets handed to somewhere else in the block diagramm. That way you have a less cumberstone diagramm, and you can work in a well defined way.

Now remove all feedbacks and write the variable names instead as if they were inputs. Repeat the process until you don't have any feedback loops. Now you can write down the solution.

To make the solution a function of phi_o1 only again, insert the earlier defined functions in their places. This time you should work from the input toward the output. You should be carefull not to forget the dependencies of each of the variables, so you don't lose any variables on the way.