Answer
$x=8,y=4$
Work Step by Step
As per the given statement we can see that
$6x+y=52$ and $x+4y=24$
Here x=number of hexagonal shapes and y= number of squares
After plugging $x=24-2y$ from the first equation in the second equation, we have
$-23y=-92$
or, $y=4$
Now, $6x+4=52$
or, $6x=48 \implies x= 8$
Thus, $x=8,y=4$