2360
Let ℓ be the length of a side of square ABCD, and OA=OB=OC=OD=r, OP=a, OQ=b, OR=c, OS=d. Also let X, Y, Z be the point of intersection of lines AB and PQ, lines BC and QR, lines CD and RS, respectively. Then, by Menelaus' theorem, we have
APOP⋅BXAX⋅OQBQ=r−aa⋅BXBX+ℓ⋅br−b=1,
from which we obtain BX=r(b−a)ℓa(r−b). Similarly, we get BY=r(b−c)ℓc(r−b), CZ=r(c−d)ℓd(r−c). Also, we have CY=BC+BY=ℓ+r(b−c)ℓc(r−b)=r(b−c)ℓb(r−c). Since triangles YBX and YCZ are similar, we get
⟺⟺BY⋅CZ=BX⋅CYr(b−c)ℓc(r−b)⋅r((c−d))ℓd(r−c)=r(b−a)ℓa(r−b)⋅r(b−c)ℓb(r−c)cd(b−a)=ab(c−d).
Solving for d from the last equation above, we get d=ab+bc−caabc, and substituting the values a=3, b=5, c=4, we get the length of the line segment OS to be equal to d=3⋅5+5⋅4−4⋅33⋅4⋅5=2360.