Step 1: Recall the thermal decomposition of alkali metal nitrates.
Alkali metal nitrates except lithium nitrate decompose on heating to form nitrites and oxygen gas.
For sodium nitrate, the decomposition reaction is
\[
2NaNO_3 \xrightarrow{\Delta} 2NaNO_2 + O_2
\]
Step 2: Identify products \(A\) and \(B\).
Comparing with the given reaction,
\[
A=NaNO_2
\]
and
\[
B=O_2
\]
Step 3: Verify the reaction type.
This is a thermal decomposition reaction in which sodium nitrate loses oxygen on heating to form sodium nitrite.
Step 4: Final conclusion.
Hence, the correct products are
\[
\boxed{NaNO_2,\; O_2}
\]