well, the threshold voltage is set by Vref times the resistor divider.
Therefore, Threshold = Vref * R1 / (R1 + R2).
For ideal operation, you want it exactly in the middle, at 1.25V.
In a real amplifier, you could set the gain to be very high and have the amplifier rail. Therefore if Vin is slightly above 1.25, the output would go to 0. If Vin is slightly below 1.25, the output would go to 5V.
I think the problem here assumes that you want linear inverting gain, meaning the amplifier's rails are much higher then your desired levels. Therefore for a net input swing of 2.5V you want the output to swing 5V. This requires a votlage gain of 2. For that to happen, The feedback resistor needs to be 2X the input resistor (which is marked R1). So when the input is halfway (at 1.25V), the output has to be at 2.5V.
Solving the equation:
(Vin-vth)/R1 = (vth-Vout) / (2*R1)
(1.25-vth)/R1 = (vth-2.5)/(2*R1)
2.5-2*vth = vth-2.5
vth = 1.66666666
So your threshold voltage has to be 1.67V.
So as long as you set Vref * R1 / (R1 + R2) to 1.67V, you're fine. This will be an inverting level shifter.