Is it legal to have a state id card in one state and a drivers license from another state?

No, it is not.