# Equation of hyperbola from asymptote?

A line $y = 2x+5$ intersects a hyperbola only at a point $(-2,1)$. The equation of one of its asymptotes is $3x+2y+1=0$. If hyperbola passes through the point $(-1,0)$ then what is the equation of hyperbola?

This is a question I found, and the solution has given the following equation as the equation of the hyperbola: $(2x-y+\lambda)(3x+2y+1)+k = 0$. Where did they get this equation from? I just know the basics of what an asymptote is, it is a line that touches the hyperbola at infinity, or basically a tangent at infinity. Where did they get this equation from?

As line $y=2x+5$ intersects the hyperbola only at a single point (but it is not tangent), then this line must be parallel to an asymptote. It follows that the equation of the second asymptote must be $2x−y+λ=0$, for some $\lambda$.
On the other hand, if $2x−y+λ=0$ and $3x+2y+1=0$ are the equations of its asymptotes, then the equation of the hyperbola is $$(2x−y+λ)(3x+2y+1)=k,$$ for some $k\ne0$. Substitute here the coordinates of the two given points to get the values of $\lambda$ and $k$.