Jim's problem should not be included as part of the main conflict in "The Gift of the Magi." Della is the protagonist and the viewpoint character. It is her story from beginning to end. Her conflict arises out of her motivation. She wants to buy her husband a nice Christmas present because she loves him so much.
Tomorrow would be Christmas Day, and she had only $1.87 with which to buy Jim a present. She had been saving every penny she could for months, with this result. Twenty dollars a week doesn't go far. Expenses had been greater than she had calculated. They always are. Only $1.87 to buy a present for Jim. Her Jim.
Jim's conflict is never mentioned in the story. Jim is not even present until towards the end when he gets home from work. Everything that happens in the story up to the climax happens to Della. She doesn't have enough money--and yet she still keeps wanting to buy Jim a nice present. She even knows what she would like to get: a watch fob to attach to Jim's beautiful pocket watch.
In attempting to solve her conflict, Della hits on the idea of selling her beautiful hair. Impulsively she goes to Madame Sofronie and sells it for twenty dollars, just enough to buy the platinum watch fob. (Note that nothing is said about any conflict Jim might be experiencing. He may not have had any conflict at all but just decided to sell his watch to raise some Christmas money.)
One problem leads to another. Now that Della has sold her hair she sees that she looks very strange. She is afraid that Jim will be repelled by her appearance and will cease to love her. This is the way with primary conflicts in stories: one conflict leads to another one which is even more serious. Della's desire to buy Jim a nice gift was a small problem, but her fear of losing him forever is a much greater problem, and she has no means of solving this one because she has parted with the only thing of value that she owned.
She had a habit for saying little silent prayers about the simplest everyday things, and now she whispered: “Please God, make him think I am still pretty.”
She did have one recourse. She could pray to God for help. And the conflict is resolved, apparently, as a result of her prayer. It turns out that Jim not only still loves her in spite of her changed appearance, but he loves her so much that he has parted with his most treasured material possession in order to buy her a Christmas present. Prayer can work miracles. The message is especially appropriate in a Christmas story.