Was their goal to overrun and annihilate Israel (which I'm sure is what the Israelis assumed), or were they simply trying to gain back the territories lost in the 1967 war? If it was the former, was this in any way feasible?
The goals are uncertain for the long-term achievements, but we have a fair idea. Israel, of course, interpreted the goal as its destruction. From their perspective, this was a reasonable view, though we can get into the particulars of Sadat's prior overtures for a peace of sorts and how that factored in. Nevertheless, Israel did not trust Egypt or Syria and did not view either as seriously wanting any kind of peace or resolution to the Arab-Israeli conflict, and after over 20 years of conflict, this was unsurprising at the time, particularly following the humiliation Arab states suffered in 1967. Even so, we have some inklings of what Egypt and Syria may have truly wanted, which may have contrasted with their public statements.
Those public statements are interesting to examine. Sadat, on October 16, 1973, gave a speech where he called for an Arab-Israeli peace conference. This, of course, was after the tide had already turned against the invading Egyptian forces, following catastrophic losses a few days prior. Sadat, in that speech, laid out the goals as: re-occupying territories lost in 1967, and to "restore the legitimate rights of the Palestinian people". What this means is rather unclear in reality, as until 1967, Egypt had been occupying Gaza itself and had not granted Palestinian Arabs political autonomy. However, given Sadat promptly goes on to equate Zionism (the belief in the right of Jews to a state in modern-day Israel) to Nazism, it is no surprise that the ultimate goal appeared to remain the destruction of Israel, at least in public. He laid out five goals for a peace conference in this speech: 1) Reoccupying territory from 1967; 2) Withdrawal of Israeli forces from all territory in point 1 in exchange for a ceasefire; 3) Attend a peace conference that would resolve the conflict with respect to "the legitimate rights of all peoples of the area" (no statement on Israel's right to exist included here); 4) Open the Suez to international travel and trade again; and 5) Seek firm promises on 1-4.
Compare this to November 1970, and you'll see an interesting difference. There, Sadat again lays out the goal of reoccupying lands Israel gained in 1967. However, there is not significant attention paid specifically to mentioning opposition to Zionism, or Palestinian rights. But in January 1971, in a separate speech, he gave a "history" of Zionism that claimed that its goal was ultimately to reach a "Greater Israel" from the "Nile to the Euphrates", a notion that is really not historically accurate at all. While he never calls outright for the destruction of Israel, his speech certainly seems to point that way.
In private, the story may be slightly different.
When the war was first launched, the early successes on the Egyptian front were not necessarily mirrored on the Syrian one. On October 7, the second day of war, Assad's military began to fear an Israeli counterattack, and asked the Soviets to seek a ceasefire that would include an Israeli withdrawal to the pre-1967 lines (though they did not pass this last part on to Sadat). When the Soviets approached Sadat to ask about a ceasefire, Sadat dismissed the idea, saying that Egypt intended to continue the war. The Soviets then asked Sadat what his goals were, and his response is described by Abraham Rabinovich in The Yom Kippur War as threefold. Strategically, to exhaust Israeli. Territorially, to gain the Gidi and Mitla Passes. Politically, the peaceful settlement of the Middle East conflict (unexplained). He said the military situation was excellent and he wanted no ceasefire yet. The Soviets were not happy, and Brezhnev said, "His position is ridiculous", but the war continued nevertheless. Sadat's forces had reached an early point, with surprising success, which surprised both US and USSR military observers. He believed, apparently, that Iraqi forces would stabilize the Syrian line and Egypt could advance. This overconfidence proved largely fatal.
Rabinovich believes, with good reason I think, that Sadat's goal was to establish a firm foothold in the Sinai, get international involvement in the peace process (with undetermined goals), and eventually secure at the very least withdrawal of Israel to the pre-1967 armistice lines. Sadat, however, grew more confident as the war went well in the opening days. He believed, given the lack of Israeli attempts at advance following a few early maneuvers, and also given that Soviet weapons were being airlifted in, that Israeli forces were eroding and would collapse if it did not get a ceasefire. Israel itself believed the same, to some extent, which is why it accepted a ceasefire proposal that would not regain the Suez canal for it. Still, Israel had some hope that it could win in a tank battle in the Sinai, which could turn the tide. Israel hoped that this would lead to an Israeli advance and crossing that would put the pressure back on Egyptian forces.
Sadat's confidence led him to, it seems, change his goals from establishing an entrenched position to attempting to seriously collapse Israeli capabilities. This was a core mistake in the strategy. Had Sadat stuck to his guns and not changed his goals, he may have achieved the desired result of an international conference and reoccupying the Sinai and Gaza, and the Syrians may have reoccupied the Golan as well. This could have led to a position of strength from which to negotiate a final resolution to the conflict, one that might even have left Israel smaller than its post-1948 borders. Instead, however, Sadat's confidence led to the defeat of Syrian forces and of his own.
Israel was of two minds. Ariel Sharon, Israel's Southern Command leader and future Prime Minister, wanted to launch an attack on the Egyptian line before they attacked first. Israel's Chief of Staff, the top military commander, thought differently, and wanted to wait two days, but also said that he believed the Egyptians would attack and he preferred to wait for that attack. Intelligence suggested that was the case, and the Chief of Staff (who, in my opinion, is underappreciated in popular recounting of the war for his insight here) prepared to repel the Egyptian attack. The choice to attack appears to have been Sadat's and motivated by Syrian requests for assistance to relieve Israeli pressure against them, but there is some dispute as to the accuracy of this, given that the Egyptian source is the general who led the attack and may have wanted to defend his mistake by putting the blame on politics. Regardless, Israel saw this (rightly) as a make-or-break moment, where either the Egyptians would break, or "we'll enter a cease-fire in the present miserable situation", as Ariel Sharon put it. The Egyptians left 350 tanks in reserve, and would put 400 to 500 in the field against Israel's 700 in the Sinai, in six thrusts at Israeli lines. The attack, as you probably gathered, failed miserably. It was a major reversal of fortunes. The head-on thrust at Israeli forces led to losses of 150-250 tanks, with virtually no significant Israeli losses (most tanks were repaired, even). The Egyptians, in their rush to alleviate pressure on the Syrians (which would not and did not happen), and to consolidate further gains, went beyond their SAM cover and were pummeled by the Israeli air force and were forced to retreat.
Could the Egyptians have pressed for ceasefire and achieved what appeared to be their early goals, along with Assad? That seems likely. Could they have even sought to exhaust Israel and gain more than the tactical goals of territorial acquisition they sought? Also likely. The Israelis knew it and the Egyptians knew it, in fact, judging by Israeli discussions about how unfavorable a ceasefire would have been before October 14. But following the turning of the tide, the situation greatly brightened for Israel, and the Israeli fear of destruction or unfavorable positions that might lead to later destruction were more or less alleviated, though the war did have the result (some would say intended by Sadat, though not in this form) of convincing Israeli leaders that their military could not defend them without some form of peace with their neighbors, which had become a feeling Israel had following the 1967 war, to some extent.