Which element is oxidized and which element is reduced in this redox reaction?

CO2(g) + H2(g) --> 2CO2(g) + H2O(g)

Is Oxygen oxidized and hydrogen reduced?

No. Oxidation is the loss of electrons; reduction is the gain of electrons. Your equation is not right to begin with. It shows a reduction half but NOT an exidation half. I suspect you intended to write

CO2(s) + H2(g) ==> CO(g) + H2O(g)

Start by assigning oxidations numbers to each. From the left:
C = 4; O - -2 each; H = 0.
On the right we have
C = +2; O = -2; H = +1 each; O = -2.

Now you look to see what has changed.
C has changed from +4 each to +2 each which means a gain of electrons.
H has changed from 0 on the left to +1 each on the right which is a loss of electrons.

To determine which element is oxidized and which is reduced in a redox reaction, we need to assign oxidation numbers to the atoms involved.

In the given reaction:
CO2(g) + H2(g) -> 2CO2(g) + H2O(g)

We can start by assigning oxidation numbers to the atoms.

In CO2, oxygen generally has an oxidation number of -2. Since there are two oxygen atoms in CO2, the total oxidation number from oxygen is -4. Therefore, the oxidation number of carbon (C) must be +4 to balance out the charge and make the molecule electrically neutral.

In H2, hydrogen (H) has an oxidation number of 0 because it exists as diatomic molecules (H2), and the overall charge on the molecule is neutral.

In CO2, carbon has an oxidation number of +4, and in H2, hydrogen has an oxidation number of 0.

After the reaction, we have CO2 and H2O. Let's assign the oxidation numbers again.

In CO2, carbon (C) still has an oxidation number of +4, while in H2O, oxygen (O) generally has an oxidation number of -2. Since there are two oxygen atoms in H2O, the total oxidation number from oxygen is -4. Therefore, to balance out the charge, the oxidation number of hydrogen (H) in H2O must be +1.

Comparing the oxidation numbers before and after the reaction, we can see that the oxidation number of carbon in CO2 remains the same (+4), indicating that it is neither oxidized nor reduced. On the other hand, the oxidation number of hydrogen changes from 0 to +1, indicating that it is oxidized.

In summary, in the given reaction, hydrogen (H2) is oxidized, and carbon (C) is neither oxidized nor reduced.