In a more direct and specific sense, Karl Marx's solution to the problem of the working class was violent revolution. He believed class conflict between worker and the wealthy owners was inevitable, and that such conflict should come in the form of armed revolution to remove the government, start over, and put in place a government of the working class, with profit being illegal, and all property owned by the state.
He believed the profit motive was why workers were being exploited so badly at the time, and that people of wealth and privilege would never give those things up voluntarily. In this way, he believed Marxism/communism was the natural evolution of a government. All class struggle, he argued, would eventually lead to it.
Basically, Marx's solution to the situation of the proletariat was to (eventually) have socialism and communism. Once this was accomplished, workers would be in an ideal situation.
The problem, to Marx, was that workers were exploited by their bosses. The people who owned the "means of production" lived off the labor of the peopld who did not own the means of production. This, to Marx, was unfair.
Therefore, he argued, the workers had to come to control the means of production. Then the people who did the work would be the ones who got the benefit of that work. (Instead of having owners get most of the benefit of the workers' labors.)