Laurie - I'm sorry you're having this problem, but I'm having trouble understanding what it is. You say "duct tape" but the pictures show something kinda shiny blue and white below the window. Is that the tape? It looks to me like the outside skin might be pulling up away from the frame at the bottom, is this what is happening? If so, I suspect you could push it back and secure it with a strip of EternaBond tape all along that edge, horizontally, not vertically, the way it seems you may have applied the tape.
When you say the foam insulation is coming down, do you mean inside the trailer? That's a whole different repair.
It IS possible to replace a portion of a frame that has rusted with new metal, but if the strength has not been compromised, it can probably be salvaged with the rust stopping coating from POR-15, which you can get from Amazon here:
Amazon.com Rustoleum also makes a rust-stopping paint that you can probably find at Home Depot and it is much cheaper. It comes in spray cans or brush-on, and I suspect brush on would be easier for you to apply there.
If I'm misunderstanding your problem, blame it on my advanced age (84), and try to explain it so I can understand. I, and the rest of the HiLo family would like to help you.
- Jack