import typing
import math


def _quadratic_distance_solution(d_0: float, v_0: float, a: float, d: float) -> typing.Tuple[float, float]:
    """
    Given an equation of the form: position = initial_position + initial_velocity * t + acceleration * t**2 / 2.0

    Using the quadratic equation: a * x**2 + b * x + c = 0

    And the solution:

    x = (-b ± math.sqrt(b**2 - 4 * a * c)) / (2 * a)

    Where:

    x = t
    a = acceleration / 2.0
    b = initial_velocity
    c = initial_position - position

    Thus:

    t = (-initial_velocity ± math.sqrt(initial_velocity**2 - 4 * acceleration / 2.0 * (initial_position - position))) / (2 * acceleration / 2.0)

    This returns the roots of t:

    t = (-v_0 ± sqrt(v_0**2 - 2 * a * (d_0 - d)) / a
    """
    part_two = math.sqrt(v_0**2 - 2 * a * (d_0 - d)) / a
    part_one = v_0 / a
    return part_one + part_two, part_one - part_two