Let:
x be Jasper's age
y be the age of Jasper's teacher.
"The age of Jasper's teacher is 3 years less than twice Jasper's age"
would mean:
[tex]y=2x-3[/tex]And
"The sum of their ages is 45"
Means:
[tex]y+x=45[/tex]We would have the following system of equations:
[tex]\begin{cases}y=2x-3 \\ y+x=45\end{cases}[/tex]Now, let's substitute equation 1 into equation 2 and solve for x, as following:
[tex]\begin{gathered} y+x=45 \\ \rightarrow(2x-3)+x=45 \\ \rightarrow3x=45+3 \\ \rightarrow x=\frac{48}{3} \\ \Rightarrow x=16 \end{gathered}[/tex]Using this in equation 1 and solving for y :
[tex]\begin{gathered} y=2x-3 \\ \rightarrow y=2(16)-3 \\ \rightarrow y=29 \end{gathered}[/tex]We can conclude that Jasper is 16 years old, and that his/her teacher is 29 years old.