The answer to your questions is not straighforward, as shown below.
The easiest to answer is your first question: are X and Y the same? No, they are not. This follows from the formula for the air-drag power Pa = ½.rho.Cd.V.(V-Vw)² , where rho is air density, Cd is drag coefficient, A is frontal area, V is forward speed, Vw is wind speed.
Suppose that for a certain power input your speed in the absence of wind is V0.
Now if you keep power constant, we have for a tailwind a forward speed Vt : Vt.(Vt - Vw)² = V0³.
For a headwind we have a forward speed Vh : Vh.(Vh + Vw)² = V0³.
For any V0 and Vw, you can calculate Vt and Vf by solving a cubic equation. It is easy to verify by substitution that for a no-wind speed of 20 mph and a wind speed of 10 mph, the headwind speed becomes 13.95 mph and the tailwind speed 27.16 mph (neglecting rolling resitance). So Y>X.
However, I find it more elucidating to consider a return trip along a road heading straight in the direction of the wind first and returning in a tailwind on the same road. Suppose that the trip without wind takes a time T0. It can be shown that the total time Tw is always larger than T0 and that the ratio Tw/T0 does not depend on A, Cd and rho nor the distance : Tw/T0 = (V0/Vh +V0/Vt)/2.
A few years ago I made a graph where the ratio Tw/T0 is plotted against the wind speed, assuming a wind-free speed of 20 mph, shown below.
The graph shows that a wind always increases the return time. At 10 mph wind speed the return time increases by 8.5%. At 15 mph wind, the increase is about 20%. This calculation assumes that the rolling resistance is small compared to the aerodynamic resistance, which is roughly the case at 20 mph.
Your question about the effect of a side wind is much more difficult to answer, because the wind-exposed area plays a big role. This takes a much more elaborate study. There is a free-access paper on the internet by Osman Isvan that investigates this question in depth.
See research paper Wind speed, wind yaw and the aerodynamic drag acting on a bicycle and rider