In two days of back-to-back interviews, speeches and meetings in New York this week, President Hassan Rouhani of Iran has gone to some lengths to sound much like President Obama in describing the need to defeat radicals and to seize what may well be a last opportunity over the next two months to reach an accord with the West over Iran’s nuclear program. But he also has jabbed at the United States for being “late to the game” in confronting the extremists of the ISIS group, declaring on Wednesday afternoon that had it not been for Iran’s efforts to rush military advisers and weaponry to Iraq three months ago, the radical group “would be residing in southern Baghdad” today. And he chided Mr. Obama for turning to air power over Syria, saying the question about the American attacks was “with whose legal authority, with what norms?” Those exchanges — the most public of them in a conversation before an audience at the New York Hilton Midtown with Fareed Zakaria, the columnist and CNN commentator — underscored how Iranian officials are struggling to pick their way through a new set of circumstances that put their interests and the United States’ in greater alignment, even as a nuclear deal appears to be losing momentum. Mr. Rouhani, who studied at Glasgow Caledonian University and whose past government posts included nuclear negotiator, has spent much of his time offering paeans to cooperation, employing Iranian sayings — and avoiding specifics. In another move to show a new Iranian attitude, Mr. Rouhani met with Britain’s prime minister, David Cameron, on Wednesday. But there were no such plans for a formal meeting with Mr. Obama, and it was unclear if the two men would even be in the same building at the same time. At one point on Wednesday he confirmed that he and President Obama, in their one telephone conversation, at the end of last year’s United Nations General Assembly session, talked of “extended cooperation” on many issues if they could resolve the nuclear dispute. But the reality, according to American and Iranian officials, is that they have yet to give birth to that first child: an accord that would determine what kind of nuclear ability Iran would retain, and what it would dismantle, for the next decade and perhaps beyond. For days before Mr. Rouhani arrived, American and Iranian negotiators were meeting to try to solve the biggest obstacle, involving Iran’s collection of roughly 19,000 centrifuges, the machines that spin at high speeds to enrich uranium. Privately, officials say, there has been a blitz of ideas, but little progress. The Iranians, for example, have suggested limiting the speed at which the centrifuges run, a solution the United States and its allies see as easily reversible. The United States has suggested dismantling the pipes that connect the centrifuges and enable the enrichment process; the Iranians see some promise in the idea but fear that large-scale dismantlement would have the appearance of a capitulation. Mr. Rouhani has deep knowledge of this, and Iranian officials say he has been regularly consulting the negotiators. But in public he avoids all talk of specifics. He seems more intent on conveying how different he is from his predecessor, Mahmoud Ahmadinejad, who used his annual visits to New York to engage in lengthy arguments with his hosts and conduct seminars on the flaws in American-style democracy. The battle against the ISIS, though, has raised new complications. The United States said it had not “coordinated” its attacks on the militant group and its affiliates, but did provide warning to the Iranians that the United States would soon begin attacks inside Syria, where the Iranians support President Bashar al-Assad. Mr. Rouhani, at the session at the Hilton, charged that in arming other rebel groups, who have been trying to unseat Mr. Assad, the United States is “creating new terrorists.” Asked whether he was referring to the American-backed Free Syrian Army, Mr. Rouhani said dismissively: “You could call them whatever you want.”