A concave mirror has an object placed in front of it, a distance x from the mirror. An inverted image is formed, whose size is half the size of the object. When x is changed by 5 cm, the image shrinks to a quarter of the size of the object. What is the focal length of the mirror?