Mary and Amy had a total of 20 yards of material from which to make costumes. Mary used three times more material to make her costume than Amy used, and 2 yards of material was not used. How many yards of material did Amy use for her costume?

MY SET UP:

Let M = Mary

Let A = Amy

M + A = 20 yards

3M + A = 18 yards

I equated 3m + A to 18 because the question stated that 2 yards were not used.

Is this the correct group of equations or is the entire set up wrong?