Change node author with Rules
I assume you are using D7 with Entity Reference.  You should be able to do this with stock Rules, without any PHP code:


Create a new rule
Event, select "After updating existing content"
Condition, select "Content is of type" to match whatever content type it is.  This will qualify the fields so that you can use them later
Condition, select some other limiting condition so that you don't target every single node with updated content.  You could, for example, do a data comparison to check if the content has a given taxonomy term
Action, select "Set data value".  Your target should be node(updated content):author.  Your new value should be node(updated content):field-new-author