Let the two numbers be x and y. We want x+y = 78, so y = 78-x. We also want the product, xy, to be a maximum. Let's substitute 78-x in place of y in the product:
xy = (78-x)x = -x2 + 78x
This is a quadratic equation and its graph is a parabola. Since the coefficient of the x2 term is negative (-1), its an inverted parabola with the vertex at the top. The vertex represents the maximum value of the product. The vertex is always located at the point x = -b/2a, where b is the coefficient of the x term (78) and a is the coefficient of the x2 term (-1). So:
x = -78/2(-1) = 39
So y = 78-x = 39