I know the way to use "such as" is that what comes after "such as" is an example of what comes before "such as".
1) However, is a sentence like this possible: "There are many ways to solve this problem such as expanding the roads, etc."
"Expanding the roads" is not an example of "this problem" but of "solving this problem". So I think this is not possible. Am I correct?
2) Would it then be OK to say "Solutions such as expanding the road can solve this problem.."
We don't say 'expanding the roads'. It's more natural to say 'widening the roads' or 'building more roads'.