There was 9 of each: 9 muffins for $3.60 and 9 pastries for $4.95
m = np-6n
You just need to multiply both sides by n