Write the formula for absolute value function if its graph has the vertex at point (0,6) and passes through the point (−1,−2).