A concave mirror gives a real image magnified 4 times. When the object is moved 3 cm the magnification of the real image is 3 times. Find the focal length of mirror.