It is 18 because it is a square so all the sides have to be the same so that would make it 18
Harriet can buy 7 of type a and 8 of type b