The best way to do this is to make up values for the sides.
Say the lengths of square B's sides are each 4 cm. That means A's sides are 2 cm.
So, the area of square B is 4^2 = 16 cm^2, and A's area is 4 cm^2. We can see the shaded area is half of A, so it's 2 cm^2.
What percent of 16 is 2?
2 / 16 * 100 = 12.5%