ok so for the 2 ft pillows the perimeter would be 8 ft and for the 1 ft pillows the perimeter would be 3 ft. So you would need 8(2)+3(3)=16+9=25 so she needs 25 feet of trimming.
X=3; you can set up a proportion using the slope equation. So (y[sub2]-y[sub1])/(x[sub2]-x[sub1])=2/1 then plug in the values and simplify. Then cross multiply and solve for x. Rest of work shown in the picture