Answer : This is an example of law of conservation of mass.
Explanation :
Law of conservation of mass : It states that mass can neither be created nor destroyed but it can only be transformed from one form to another form.
The balanced chemical reaction always follow the law of conservation of mass.
Balanced chemical reaction : It is defined as the reaction in which the number of atoms of individual elements present on reactant side must be equal to the product side.
For example :

This reaction is a balanced chemical reaction in which number of atoms of hydrogen and oxygen are equal on the both side of the reaction. So, this reaction obey the law of conservation of mass.
As per question, the total mass of the cake was equal to the total mass of the ingredients. That means, they obey the law of conservation of mass.
Hence, this is an example of law of conservation of mass.