In my opinion Poland.
Why?
Compare army and air force.
Poland - smaller army but in middle of modernisation process from old Warsaw pact era equipment to modern army.
Ukraine - large army with lack of funds, all equipment from soviet era. We don't know if it's even running.
Let's compare some basics aspects:
Military Budget:
Poland 9 150 000 000 $
Ukraine 3 863 000 000 $
Poland has smaller army but 3 times larger budget.
Tanks
Poland: 128 Leopard 2A4 ~250 PT91 Twardy (Polish MBT) and ~400 T-72 in reserve.
Ukraine: 2200 obsolete T-64, 1300 T-72 and 271 T-80 UD in Reserve.
In numbers Ukraine wins but.. in technology... I cannot imagine T-64 fighting during a night or trying to survive Spike missile... Question is if Ukrainian T-72 and T-80 are operational or totally forgotten
APC IFV
Poland: ~1000 Rosomak - modern APC/IFV. Tested in Iraq and Afghanistan - proved to be very good and very resistant to RPG.
~ 1000 BWP1 - obsolete IFV
Ukraine: only obsolote IFV/APC: ~1000 BMP1 ~1000 BMP2 ~2000 MT-LB ~400 BTR80 (btw why they need ~5k APC/IFV? they don't have money to keep them all running).
Again in numbers Ukraine wins but Rosomak vs any of the Ukrainian APC/IFV... you can foreseen result
Artillery:
Poland: A lot of old artillery, but also some new pieces are entering polish army right now ( Krab, Langusta, Rak etc). Within next few years all obsolete artillery will be replaced by modern one.
Ukraine: A lot of old Artillery.
For now Ukraine wins - in next few years this will change.
Anti- Tank equipment:
Poland: ~3000 Modern Anti Tank rockets - Spike, ~300 obsolete soviet era
Ukraine: Mostly obsolete AT missiles.
There is nothing to compare. Poland wins.
AA
Poland: Obsolete equipment with some very good pieces:
~2000 GROM rocket - proved in South- Ossetia War: 12 rockets were fired out of which 9 hit their targets.
Poprad - AA system based on Grom missiles
Ukraine: obsolete soviet era equipment. Only Kolchuga sensor system is good.
Helis:
Poland: Obsolete Mi-24,W-3, Mi-2. some of them upgraded with additional Survivability Equipment.
Ukraine: Obsolete Mi-24, Mi-26, Mi-8,Mi-9
Both sides have only few dozens of combat helicopters. Irrelevant for battlefield.
Air Force:
Poland: 48 F-16 Block D 52+. Newest version of F-16.
32 Mig-29 with some minor upgrades.
32 Obsolete Su-22
Ukraine: 36 Su-27 (only 16 are operational)
80 Mig-29
120 Su-24 (only 36 in service).
Again in numbers Ukraine wins but in quality Poland wins. Question is how many Ukrainian aircrafts are really operational.
There is no point to compare Navy as these countries have access to different seas.
Conclusion:
Poland - smaller army, quite modern with some obsolete equipment, most of which is 100% combat ready.
Ukraine - very large numbers but obsolete. Moreover unknown status of most of the equipment.
In my opinion Poland vs Ukraine 1:0 but with heavy losses on both sides.
Anyway Poland is NATO and EU member and in case of war air supremacy of Nato countries is out of any question. With open skies every country is automatic loser.