Great topic--I love cake and I love to bake!!
I am assuming that your 12x18x2 implies 12 inches wide by 18 inches long by 2 inches deep. I will also assume that the 10 inch by 10 inch cake is 2 inches deep which would be standard when baking a cake.
For the larger cake if you multiplied 12 x 18 you would get an area of 216 square inches. For the smaller cake on top if you multiplied 10 x 10 you would have an area of 100 square inches.
If you cut each piece of cake into a 2 inch by 2 inch square piece, each piece would have an area of 4 square inches. So divide 216 by 4 and you get 54 pieces. Then if you divide 100 by 4 you get 25 pieces. 54 pieces + 25 pieces equals only 79 pieces.
Personally, I like cake and if you measure out anything smaller that 2 inches by 2 inches for a piece of cake it really gives you such small pieces that is not more than a bite or two of cake.
It is my opinion that you would not be able to get 100 pieces of cake worthy of serving at a wedding.
This question does not have enough details to answer the question. To determine if the cake will feed 100 people, you would first have to know how big the slices are going to be. If the serving size of the pieces of cake are 1"X1" then the answer would be yes. I the serving size of the pieces of cake are 3" X 2" then no that would not be enough.
Multiply the length of the cake times the width times the height. For example (12 X 18 X 2). Then determine how large the servings will be, (1X1) 2X2)then divide the product of the serving size into the total square inches of cake and that will tell you how many people you can serve.
To do that, multiply the breadth and length of cake by 12 by 18 to get 216 square inches. Then, also multiply the smaller square cake by 10 times 10 to get 100 square inches.
To serve the maximum and the most cake pieces, I recommend cutting the cakes 2 by 2 inches for the top and the bottom. That will be good enough. Sadly, that won't be enough, as you won't get 100 pieces exactly ( you won't even get 100 pieces at all even you change the inches of the cake). So, some people won't get a slice of cake at all.