Romanians can't enter Ukraine with an ID card; only Ukrainian and Turkish citizens can.
So you have to go to Poland through Hungary and Slovakia.
EDIT: as a dual Romanian-Ukrainian citizen, you can use your Romanian ID to enter the Schengen Area (in your case through Poland)