# How do you solve 2x+3y=31 and y=x+7?

Apr 26, 2018

$x = 2$ and $y = 9$

#### Explanation:

We have:

$2 x + 3 y = 31$ ..... [A]
$y = x + 7 \setminus \setminus \setminus \setminus \setminus \setminus \setminus$ ..... [B]

We can perform a direct substitution of Eq [B] into Eq [A] giving:

$2 x + 3 \left(x + 7\right) = 31$

Now, we collect terms and solve for $x$:

$2 x + 3 \left(x\right) + \left(3\right) 7 = 31$

$\therefore 2 x + 3 x + 21 = 31$
$\therefore 2 x + 3 x = 31 - 21$
$\therefore 5 x = 10$
$\therefore x = 2$

Now we can substitute $x$ into [B] and solve for $y$

$y = 2 + 7$
$\therefore y = 9$

And having gained the solution $x = 2$ and $y = 9$, we can validate the result using Eq [A]:

$2 x + 3 y = \left(2\right) \left(2\right) + \left(3\right) \left(9\right) = 4 + 27 = 31$, as expected.