The best response that explains why Mars' and Venus' surface temperatures vary, despite both having atmospheres that contain mostly carbon dioxide, is: "Mars has a thin atmosphere that cannot hold much heat."
Although both planets have CO2-rich atmospheres, Venus has a much thicker atmosphere, which creates a strong greenhouse effect, trapping heat and leading to extremely high surface temperatures. In contrast, Mars' thin atmosphere does not retain heat effectively, resulting in much colder surface temperatures.