I will leave the math to you as this is a great exercise in understanding the basics of power electronics. But, I'll give you the flow of what's going on.
The LM317's regulation loop is going to attempt to maintain some voltage (Vref) at the ADJ pin. It does this by comparing this voltage against an internal reference. For the time being, perform the analysis without R3 and V2. The part's job in life is to provide whatever voltage at OUT it needs to ensure that Vadj == Vref. Knowing the regulation voltage of the ADJ pin and the value of R1, you know the current flowing in R2. Vadj + Ir2 * R2 = Vout.
Now, understand that V2 and R3 are just providing some amount of current into (or out of) the ADJ pin's node. If V2 = Vadj, then the circuit performs just as if there were no R3 connection. If V2 goes above Vadj, then current is added into the ADJ node from this connection. Since that current also goes through R1, the control loop has to decrease Vout to accommodate this additional current. If V2 goes below Vadj, current is pulled out of the ADJ node, and Vout must increase to provide the additional current through R1. As you write the nodal equations, just remember that the feedback loop of the regulator is just trying to hold the ADJ pin at Vref.
Note that this is just the first order analysis and there can be stability and transient issues with approaches like this, but this exercise should greatly increase your understanding of this circuit.