Now calculating cash paid 2 creditors
gross profit margin is 1/3 or 33.33%
Here we assume Cost of sales=Purchases (as opening stock is not given althaugh closing is given)
"Goods are purchased one month before sale and paid for two months after purchase"
it means september one is purchased in August & paid in octomber(2 months after purchase)
40000 is sales in september which contains 33.33% or 1/3 gross profit margin
cost of sales = 2/3 or 66.66% of 40000 which is equal to 26.6*(you can round it up to 27)