x= apart cu 2 camere
y= apart cu 3camere
2x+3y=46 camere si x+y=19 apart.
scoatem pe x din relatia x+y=19 x=19-y
inlocuim pe x in prima relatie si obtinem 2(19-y) +3y =46
38-2y+3y=46
y=46-38
y=8
inlocuim pe y in relatia x+y=19
x+8=19
x=19-8
x=11
in relatia2x+3y=46 inlocuim pe x si y.
2*11+3*8=46
22+24=46