The online instructions for Solve give the following example of solving 2 linear equations:

Solve[-7 + a x + y == 0 && -1 + b x - y == 0, {x, y}]

Giving the following output::

{{x -> 8/(a + b), y -> -((a - 7 b)/(a + b))}}

However, if I define two functions g1 and g2 like this:

g1[x_]:=-7+a x+y and g2[x_]:=-1+b x-y (these are the left sides of the two equations in the above example),

and then if I write: Solve[g1==0, g2==0, {x,y}]

I get the following:

Solve::ivar: -1+b x-y==0 is not a valid variable. >>

Solve[-7 + a x + y == 0, -1 + b x - y == 0, {x, y}]

Why can't I put a function like g1 or g2 into Solve?