First, find the area of the piece of fabric, which is 40x38= 1520. (Base times height.)
Then you find the area of the scarf, (triangle.) 1/2x30x27 = 405 (half times base times height is area of triangle formula.)
Finally, subtract the area of the scarf from the fabric to see how much is left over. 1520-405= 1115
I tried to explain it so that it could make as much sense as possible. Sorry if it's a bit hard to understand.