You can, in fact rent a car in one state and drop it off in another but as Ken said you will be paying extra for it.
As for the hotel/motel situation if you stay close to the Interstate with well known companies you should be fine. When traveling I personally don't stay at places that have direct access to the rooms from outside (i.e. you have to go through a lobby to get to elevators to get to the rooms). That's just my preference though.
The trip is doable but that's a lot of time in the car. If you like road trips, it'll probably be a good time, if you prefer getting to your destination and spending time there my suggestion would be to fly.
Either way, with three weeks you'll have time to do a little of everything.