CREATE TABLE table_name_40 (first_elected INT, results VARCHAR, incumbent VARCHAR)

What is the latest year for first elected with john hostettler as incumbent and a result of lost re-election democratic gain?
SELECT MAX(first_elected) FROM table_name_40 WHERE results = "lost re-election democratic gain" AND incumbent = "john hostettler"
SELECT MAX("first_elected") FROM "table_name_40" WHERE "incumbent" = "john hostettler" AND "lost re-election democratic gain" = "results"