Op-amp problem, two inverting amplifiers?
simulate this circuit &ndash; Schematic created using CircuitLab

The schematic shows how the whole circuit should/could be interpreted. 
Of course, I have assumed that the second opamp is used as a non-inv. amplifier (gain A). Only in this case, the circuit can be used as a linear amplifier.

Regarding the output Vout1 it can be treated as a classical inverting configuration. For gain calculation you can set Vn to zero (Vn is the voltage at the inv. terminal). Because this voltage is produced from two voltage sources (V1 and Vout1) you have to use superposition rules Vn=Vn1+Vn2 (Vn1 caused by V1 with Vout1=0 and Vn2 caused by Vout1 with V1=0) 

If the gain Vout1/V1 is found, it will not be a problem to find the wanted ratio Vout2/Vin because of Vout2=Vout1*A with A=(1+R5/R4).  

EDIT/Comment:

Realizing that R3 enters the feedback path with a value reduced by the factor A (because the current through R3 is A times larger if compared with R2), you immediately can write down the result (making use of the well-known inverter formula):

G1=Vout1/V1=-(R2||R3eff)/R1 with R3eff=R3/A

G2=Vout2/V1=A*G1