Can a Idaho resident buy a long gun in Missouri?

No. Idaho State law. A resident of the state of Idaho may purchase rifles and shotguns in a state contiguous to Idaho. Residents of those states may purchase a rifle or shotgun in Idaho. Missouri is not contiguous to Idaho.