If one end of thread is (-8,5) the other end would be (32,5) as distance is 40m.
Now you will get two cases
First case -Thread is cut as 10m , 30m lengths (reference from point (-8,5)) i.e some point P divides two points (-8,5) and (32,5) in the ratio 1:3.
Second Case- Thread is cut at 30m,10m lengths (reference from point (-8,5)) i.e some point P divides two points (-8,5) and (32,5) in the ratio 3:1.