.
Let x be the first part distance, in miles; let y be the second part distance.
Then your system of equations can be written in this form
x + y = 23 (1) (miles total)
x = y - 5 (2) (The first part of the trip is 5 miles less than the second part)
or in this form
x + y = 23 (1) (miles total)
x - y = 5 (2) (The first part of the trip is 5 miles less than the second part)
Both forms are equivalent.
First form is just ready for the solution by the Substitution method.
While the second form is just ready for the solution by the Elimination method.
You may use ANY of these two forms and/or ANY of these two possible solution methods.
Enjoy Math (!)