## How to set up this Lagrange?

I have a maximization problem for f(x,y) s.t. p1x+p2y=g

I cannot remember how to set up the Lagrange for this.

Is it:

1.) f(x,y) +n(p1x+p2-g)
or
2.) f(x,y)+n(p1x+p2-g)+mx+my

If it is the latter, can someone explain to my why it is the latter? (I'm thinking product rule but I'm quite confused.)