Far things move slower than near things. That's the whole law: layer.x = camera.x × factor, one factor per layer. Press Run, then move your pointer across the canvas — you are the camera.
Move your pointer left and right. The three factors (0.2 / 0.5 / 0.9) are the entire depth illusion.
In Godot: Parallax2D nodes with scroll_scale = these exact factors — download parallax.gd from the Godot project. In Unity: the three multiplications go in LateUpdate(), one per layer transform. In Unreal (2D): same arithmetic driven by the camera position. Chapter 04.