Find the values of $a$ and $b$ in the equation $y=ae^x + b$. Someone just gave me this question to solve and I am not sure how they got to the conclusion.
Question: Consider the graph given by $y=ae^x + b$. Find the values of $a$ and $b$.
I don't know how to add graphs in here, so I am providing the link to a graph on desmos. The graph, the coordinates of the point $(0, 6)$ and a line $y=4$ are the only thing that is given in the graph on the question and we are supposed to deduce the values of $a$ and $b$. In the case of desmos, the graph does tell you the values of $a$ and $b$ but we are not given the values of $a$ and $b$ in the graph given in the question. We are just given that the graph intersects the $y$ axis at $x=0$. So we are given the graph with point $(0, 6)$ labeled on it and the line $y=4$.
Graph: https://www.desmos.com/calculator/vv00xwli8t
My Question: How does one reach the conclusion that $a=2$ and $b=4$? I tried a few ways and I just couldn't seem to construct a rigorous argument for how I got the answer.
Edit 1: As pointed out in the comments, I wrote "The graph intersects the y axis at $0$". I meant to write it intersects the y axis at $x=0$. Edited that now.
 A: So, to succinctly summarize this:

*

*You want the equation of a graph, in the form $y=ae^x+b$.

*You know that $(0,6)$ is on the graph.

*You are given a line $y=4$, presumably getting very close to the exponential curve the further left you go.

To find $a,b$, note the following: for your generic equation $y=ae^x + b$,

*

*What is $y$ when $x=0$?

*What is $y$ when $x \to -\infty$ (goes very far left?).

For the first, simply plug in $x=0$: you'll see that, then $y=a+b$. That is, $(0,a+b)$ is on the graph.
For the second, what happens to $e^x$ (just that, nothing else) when $x \to -\infty$? That is, what is $e^x$ getting close to, as you let $x=-10$ and then $x=-100$ and then $x=-1,000$, and so on? You'll find it is zero. That is, the line the graph approaches is $y=0$.
Of course, if you have $e^x+b$, then the line in equation is $y=b$. (In general, $g(x) = f(x)+b$ shifts $f(x)$'s graph up by $b$.)
So you've seen the two critical pieces of information:

*

*$(0,6)$ is the point $(0,a+b)$

*The line $y=b$ in general corresponds to the line $y=4$ in your scenario.

Hence, you easily reach the prescribed answer of $a=2$ and $b=4$.
