probability

This is simply the ratio of favourable outcomes to total possible outcomes.
In this case, a favourable outcome is picking a spot within 2cm of a corner. The total possible outcomes is anywhere within the square.

The total area is equal to 5x5 =25 cm^2 (total possible outcomes)

The area within 2cm of the corner is equal to 1/4(Pi(2^2))*4 or just
Pi(2^2) = 12.57cm^2 (favourable outcomes)

Expressing this as a percent gives:

12.57/25 x 100/1 = 50.28%

If you're having trouble visualising how this works, imagine the square was just split in half. Half the area would be covered by each region so you'd have equal chance of picking either area (50%).
Your particular problem works the same way, the area just is spread into 4 regions and each is a quarter of a circle of radius 2cm.