Putting 10 million Ukrainians in Poland is not going to benefit anyone, and is just going to lead to long-term ethnic tensions. Poland is incredibly russophobic, and Russia will hardly want to make them more powerful as well.
The best solution is for Russia to take the southern and eastern parts of Ukraine, and the rest becomes a heavily demilitarized buffer state. Have its neutrality declared in the Constitution, along with strict limits on military size. Grant Russian equal legal status with the Ukrainian language, and guarantee autonomy and linguistic rights to ethnic minorities such as Hungarians and Romanians in the new Ukraine. Allow economic links with all countries, but no Western buyouts of Ukraine's natural resources and means of production. Eventually the russophobia will die down in Ukraine, and the people will see they are much more prosperous compared to the time when the globohomo regime was meddling in everything.
In exchange, Putin may have to grant some concessions to the US, such as declaring neutrality in the Middle East conflict.