So you have a regular inverter in the truck and want to plug in the trailer to power it's onboard charger to charge your trailer battery, correct? This will work but is kind of complicated means of doing it.
Your fridge will pull about 300 watts on 120v AC so that's about 30 amps at 12v coming out of your alternator. If you truck is just idling I don't know how much it will put out but likely not that much. Your camper should have an electric cord that plugs into the truck for 12v power as well as marker lights and maybe signal and brake lights. This cord should allow the truck alternator to charge the battery when running without using the inverter or the camper's charger. If it's not set up that way I would make it that way. You eliminate 2 pieces of equipment and lots of inefficiency and inconvenience.
Running the fridge on 120v this way is probably less fuel efficient and cost effective than just running it on propane but I guess you could do it if you wanted to. Most people just run them on propane like they're designed to do. They typically cool better on propane than electric anyway.
It's impossible to say how long this set up would take to charge your battery. Nobody here knows what charger you have in your camper or if your truck's alternator puts out enough power at idle to power it.