How were the Americans able to defeat the Japanese when they appeared to be at such a disadvantage?
Are you talking just about the Battle of Midway, which you've tagged it with?
If so, I have two answers. First, I do not think the US was at as much of a disadvantage as your question suggests. The number of airplanes available to both sides was not that different, I believe. The Zeroes were much superior to American fighters, but the other airplanes were not all that different.
Secondly, the US had a great deal of luck. They managed to catch the Japanese in the middle of trying to switch types of weaponry on their aircraft and trying to refuel. This meant that the Japanese carriers were very vulnerable to attack.
The advantage held by the Japanese over the US in the second world War was basically because of the initiative they took in attacking USA. At that time USA had not really entered the war directly, so they took some time to regain initiative and advantage from the Japanese. The Task of USA was made more difficult by two factors. First was that it was very much tied up with the countering the forces of Hitler and his allies in Europe and Africa. Second the Japanese war and successes of Japan were in areas far removed from the USA.
However, my assessment is that USA was much better placed than Japan all areas important for success in war including industrial, economic and military capabilities. It is just that USA took some time to control the Japanese offensive and then drive them back.
By "disadvantage" I assume you mean right after Pearl Harbor? Since the Japanese failed to take out our Aircraft carriers during that attack, the Americans (and allies), were able to start near the Southernmost area of Japanese influence (New Guinea, Solomon Islands, ECT..) and gradually push their way to the north. We were also fortunate to have prevailed in several decisive sea battles. The US also had quite a stockpile of weapons, soldiers, and resources at their disposal which after the first couple years, began to kick into play. The Japanese were pretty much defeated in most of their Empire by the time we used the Bombs on Nagasaki and Hiroshima. The US was never at a disadvantage, as England experienced in the early part of WW2, the US was simply stunned a little, but had the desire and resources to not only defeat Japan, but to shore up England against Hitlers empire at the same time.