There are a few different reasons why the American colonies were able to prosper even though the British government had a policy of mercantilism.
One reason why the colonies were able to prosper is because much of what they made were not subject to mercantilist policies. These include such things as fish, wheat, and corn. The colonists were able to sell these things to whomever they liked, which meant that they were not burdened by the mercantilist policies.
A second reason why the colonies prospered is because they had some things that the English wanted. There was a great deal of demand in England for ships because England engaged in so much shipping (the Navigation Acts required goods to be transported in English ships) and yet it lacked the materials to build as many ships as it needed. This meant that the English bought many ships made in America.
Finally, the colonies prospered because mercantilist policies were not very well enforced. The British engaged in “salutary neglect” of the colonies. This meant that they really did not try to enforce many of the mercantilist laws. Because they did not enforce the laws, the colonists were easily able to evade them and prosper through relatively free trade.