So, this question is slightly confusing on the language part actually.
Now, we know G spread = Corporate bond yield – Interpolated Govt. bond yield
Since, the yield curve is upward sloping so the bond with highest duration will have highest govt. bond yield. Hence, Bond X has highest govt. bond yield and lowest G spread keeping other things constant.
So, this question is slightly confusing on the language part actually.
Now, we know G spread = Corporate bond yield – Interpolated Govt. bond yield
Since, the yield curve is upward sloping so the bond with highest duration will have highest govt. bond yield. Hence, Bond X has highest govt. bond yield and lowest G spread keeping other things constant.