Math question: Geometric problem

Hey guys, can anyone help me solve this? The answer is 24 but I am not quite sure my approach is even valid.
Thank you in advance