Here are two ways to produce a mist effect in the compositor.
Simply enable the Mist pass in the Render Layers. You can then adjust the depth of the mist in the World settings as in the screenshot in your question. ie,
To use the Mist pass you simply use the Mist render layer output as the Factor of a Mix node to mix between your rendered image and the mist color :
To adjust the mist you need to adjust the Mist Pass settings in the World properties and re-render the scene. You could get limited adjustability by adjusting the Mist output using Maths nodes or similar before using it in the factor but it's limited to the range of mist in your original settings (eg, if the mist ends at 500m then there's no way of adjusting it further than that). You're generally best just adjusting the Mist Pass settings and re-rendering.
An alternative is to use the raw Depth pass and manipulate it using Maths nodes or similar to get the desired mist. This can be achieved as follows :
Here the Divide maths node re-scales the Depth - we need to convert the raw depth so that the desired depth of mist corresponds to the mathematical range of 0.0 to 1.0 to use in a Mix node. Adjust the divisor to get the desired depth. The Subtract node allows you to adjust the distance to the start of the mist.
Note that the Divide node is set to not Clamp but the Subtract is set to Clamp. The Subtract set to Clamp is to ensure that the value passed to the Factor is always within the range 0.0 to 1.0 - otherwise strange effects can occur since the compositor nodes do not automatically clamp the factors (as Cycles material nodes do). However, Clamping the Divide node would skew the calculation and can cause undesired effects - such as the mist not increasing to maximum value at the far distance of its range.