One answer is x=2.5 because QRS could be a right triangle where R=right angle.
So we have QS²=QR²+RS², 25=16+9 so RS=3 and 2x-2=3 so 2x=5, x=2.5.
Let’s look at the problem more generally by applying the cosine rule.
QS²=QR²+RS²-2QR.QScosR. Let y=RS=2x-2 so, plugging in values we get y²-8ycosR=9.
Complete the square:
y²-8ycosR+16cos²R=16cos²R+9, (y-4cosR)²=16cos²R+9.
Take square roots: y-4cosR=√(16cos²R+9). Only the positive root counts because y would otherwise be negative and we can’t have a negative length for a side. So the square root must be between √9 and √25, that is 3 and 5 because cosR is between -1 and 1. So we have already seen that y=3 when R=90° and cosR=0. Let’s pick an arbitrary value for R, for example, 60° and cosR=½. This gives us y=4cosR+√(16cos²R+9)=2+√13. Therefore 2x-2=2+√13 and x=2+√13/2=3.8 approx. There are clearly many solutions for x.