Write a program without the semicolon after the cout line. The compiler says expected ';' before 'return'. It expected a semicolon but found return instead. The error points to the line after the mistake, not the mistake itself.
The compiler did not realize anything was wrong until it saw return without a semicolon ending the previous statement. Look one line up when you see semicolon errors. Fix the error by adding ; after endl.
Run the program and it works. Missing semicolons are the most common beginner mistake. Double-check every statement ends with one before clicking run.