can some one help me set this up into eqautions to be solved please.

One number is 6 more than another. If the sum of the smaller number and 3 times the larger number is 34, find the two numbers.

x=10
y=4

Those are the answers but how do you get to them.

3 liters= mL

Wouldn't this work?

x = y+6

x + 3(y+6) = 34