Lewis and Clark reached the mouth of the Missouri River in July of 1805. Not knowing this was the mouth of the Missouri they were faced with the merging of three river. If the Missouri reached the Pacific Ocean (the Northwest Passage) it "had" to be one of these 3 rivers. Seeing the tall mountains in the distance L and C both had concluded that there was probably not going to be a NW Passage.
They simply wanted to travel as far as possible via water (with 4 to 5 thousand pounds of cargo). They had to make a guess as to which river was the Missouri River, that was headed west. Clark stood on the below rock looking west and simply guessed which of the three rivers went west.
The rock ledge on the right of pic is where Clark stood: You can see the marker at the top of the ledge in the distance.
You can walk to the "Clark Overlook" and see exactly what Clark saw:
Three rivers all flowing in different directions:
Clark choose the correct river traveling the furthest to the west.
They finally ran out of navigable water near today's Dillon, Montana. And up Lemhi Pass on foot and horseback they find the literal end of the Missouri River about 4 miles up Lemhi Pass Road the mighty Missouri is a tiny stream. (The mouth of the Missouri River).