For this case we propose a system of equations:
p: Variable representing the cost of a pair of pants
s: Variable representing the cost of a shirt
A pair of pants costs twice as much as a shirt, means:

The total cost of 1 pair of pants and 1 shirt is $ 18:

We substitute the first equation in the second:

Answer:
The following equation can be used:
