Kepler's third law states that the square of the orbital period is proportional to the cube of the semi-major axis of its orbit. In equation form, P^2 / a^3 = constant. For the earth, (1 y)^2 / (1 AU)^3 = 1, so the constant is 1. For a planet 4 AU from the sun:
P^2 / (4 AU)^3 = 1P^2 = 64P = 8 years