Diya has got a nice birthday cake for Arshiya and Alayna, her twin daughters. The two sisters were amazed to see the strange triangular-shaped birthday cake. On the cake ABC, there is a line from one of the vertex A to the midpoint of the opposite line BC. On her daughter’s birthday, Diya declared a quiz competition. She told her daughters that she will make two more square-shaped cake as the prize of that quiz competition. Each side length of Arshiya’s cake will be equal to AB, one side of the triangle-shaped cake. Each side length of Alayna’s cake will be equal to AC, one side of the triangle-shaped cake. For getting the prize, Arshiya and Alayna have to calculate the sum of the area of these two square-shaped cake. As they want to win the prize, they want your help. You will be given some information about the triangle-shaped cake for solving the challenge. You will be given AB, the one side of the triangular-shaped cake, AD, the line from vertex A to the midpoint of BC and the angle DAB.

This is a companion discussion topic for the original entry at https://toph.co/p/piece-of-cake