The effective mass varies from the original mass by the square of the lever ratio. Note that if the lever were instead a pair of gears of radii a and b, the result would be the same.
Now find the effective spring that would have to be placed at B to eliminate the lever. Equating the potential energies in the springs at points A and B