"Moore-Penrose" is much too advanced for me ("Moore" isn't so bad but I cringe when I hear "Penrose") so I would do it with Lagrange multipliers (I much better with "Lagrange").

You want to minimize subject to the constraint G(x,y)= x+ 2y= 5. The gradients are and . Now we need to find (x,y) so that . That means we must have and . Dividing the second equation by the first give or y= 2x. Putting that into the constraint x+ 2y= 5, x+ 2(2y)= x+ 4x= 5x= 5 or x= 1, y= 2.