House and Senate conferees on the Amtrak funding bill scratched each other's backs yesterday and saved two so-called political trains from extinction.

While agreeing on a $912.7 million budget for Amtrak for the fiscal year beginning Oct. 1, the conferees also raised from the dead two passenger trains, the Shenandoah and the Cardinal, that do not meet the criteria outlined by Congress as it cut 20 percent of Amtrak's passenger miles.

The Senate had voted to save the Cardinal, which runs between Washington and Chicago, and the House had voted to save the Shenandoah, which operates between Washington and Cincinnati. In yesterday's compromise the conferees saved them both.

Rep. James J. Florior (D-N.J.), defending the action, said both trains will have to attract enough passengers in the next two years to meet ordinary standards or they will again face cancellation. He admitted, however, that legislation then could rescue the trains anew.

The new legislation requires Amtrak trains to average 150 passengers per mile, with losses of no more than seven cents per passenger mile. Latest available figures indicated the Cardinal averages 61 passengers a mile, at an average loss of 10.6 cents, and the Shenandoah attracts 27 passengers per mile, losing 14 cents a mile.

Both trains run through West Virginia, the home of House Commerce Committee Chairman Harley O. Staggers and Senate Majority Leader Robert C. Byrd. Staggers attended yesterday's conference, but did not speak on behalf of either train. The agreement to retain the trains had been worked out before the meeting, according to a staffer.

In an effort to be ready for the Oct. 1 curtailments, Amtrak announced on Aug. 29 that it was eliminating five well-known trains: the National Limited between New York and Kansas City, the North Coast Hiawatha (Chicago-Seattle), the Lone Star (Chicago-Houston), The Floridan (Chicago-Florida), and the Hilltopper, which connected Boston and Washington to Ashland, Ky. The Hilltopper, which also runs through West Virginia, had survived several earlier attempts to kill it.

Included in the authorization is $23.8 million as the federal share for continuing some popular commuter runs including the Blue Ridge between Harper's Ferry, W. Va., and Washington.