def polynomial_add_polynomial(a, b):
    """
    Addition function of two polynomials.
    :param a: First polynomial.
    :param b: Second polynomial.
    :return: The result of adding two polynomials
    """
    len_a, len_b = len(a), len(b)
    if len_a < len_b:
        a, b, len_a, len_b = b, a, len_b, len_a
    return [a[i] + b[i] for i in range(len_b)] + a[len_b:]