There are several important information's already given in the question. Based on those given information's the answer to the question can be easily deduced.
Number of cakes that Andrea has = 2
Amount of cake each of her friends eat = 2/3
Let us assume the number of friends that Andrea has = x
Then
(2/3) * x = 2
2x/3 = 2
2x = 2 * 3
2x = 6
x = 6/2
= 3
So we can say from the above deduction that Andrea has 3 friends and this makes 3 servings also. I hope the procedure is clear enough for you to understand.