In graph theory, what is the difference between a "trail" and a "path"?

Solution 1:

You seem to have misunderstood something, probably the definitions in the book: they’re actually the same as the definitions that Wikipedia describes as the current ones.

Solution 2:

A walk of length k is a non-empty alternating sequence of vertices and edges in G.

A walk is a trail if any edge is traversed at most once.

A trail is a path if any vertex is visited at most once except possibly the initial and terminal vertices when they are the same.