def connect_arrays(first, second, place_holder=-1):
    """ It connects two arrays in provided order into one. Before the arrays
        are joined they are extended to longest array length where missing
        values are substituted by place_holder argument.

    >>> connect_arrays([1, 2], [3, 4, 5], -1)
    [1, 2, -1, 3, 4, 5]
    """
    len_first = len(first)
    len_second = len(second)
    max_size = len_first
    if len_second > max_size:
        max_size = len_second
    new_first = max_size * [place_holder]
    new_second = max_size * [place_holder]
    new_first[0:len_first] = first[:]
    new_second[0:len_second] = second[:]
    return new_first + new_second