The Venezuelan government has freed two American men as the country seeks to improve its relationship with the United States amid Russia's war with Ukraine.