Unless last-minute clemecy pleas, including one from President Carter strike a responsive chord, black insurgent Solomon Mahlangu, 22, is to be hanged Friday for his part in a 1977 incident that left two whites dead. It was an incident characterized b authorities here as the beginning of urban guerrilla warfare in South Africa.

Prision authorities notified Mahlangu's family in Pretoria of his impending execution, signalling President John Vorster's rejection of a clemency plea from the family sent after all judicial appeals had failed, Mahlangu's atorney, Ismail Aybo, said today.

Executions for politically motivated crimes have been rare since the ruling National Party, with its racially discriminatory policy of apartheld, came to power in 1948.

According to well-Informed sources, Carter cabled an appeal for mercy to the South African government, backing up a previous request.

[A White House spokesman confirmed that Carter sent a message Tuesdby but declined to release the text]

It is considered unlikely here that the government will heed the plea, considering the current friction with Washington over U.S. efforts to negotiate an end to the guerrilla war in the South African administered territory of Namibia.

Britain, France and such groups as the World Council of Churches have also appealed to South Africa for clemency.

A commutation of Mahlangu's sentence would be out of line with the present security efforts that have included stepped-up arrests of blacks who do not have the necessary permits to live in urban areas, nightly roadblocks around the nearby black township of Soweto and police surveillance of black leaders.

The government also must take into account the revulsion and fear that swept the white community after the June 1977 incident, when twi garage mechanics were shot dead in downtown Johannesburg as they sipped their morning tea.

According to testimony at Mahlangu's trial, he left South Africa in 1976 and was given training in sabotage techniques in Angola and Mozambique by the South African Black nationalist organization, the African National Congress, which was banned in 1960 and has opted for guerrilla warfare against the white government.

Along with two other recruits, Mahlangu returned to South Africa through Swaziland in June 19778 carrying automatic pistols, bombs and detonators concealed in toothpast tubes, boxes of detergetn, Kleenex and cocoa, according to the testimony. Upon arrival in Johannesburg, the court record continues, the three panicked when approached by a man they thought was a policeman. One ran away and escaped over the border.

Mahlangu and Mondy Motloaung ran in panic into the garage and Motloaung shot at the men drinking tea, the court was told. He was later found mentally unable to stand trial because of head injuries received at the time of his arrest.

Despite evidence that the killings were the unpremediated consequence of panic, and despite the fact that Mahlangu was found not to have fired his weapon, Supreme Court Judge Charles Theron found him guilty by "common purpose."