Was it reasonable for the Japanese to have won the war in the Pacific? The fact that they preemptively struck against the USA implies that they believed they could win, but in reality with the gift of hindsight was a Japanese victory likely? And if one was to speculate how possibly could it have happened?
There was no likelihood whatsoever of Japan winning a prolonged war against the U.S., and Japanese planners realized this from at least the earliest days of the 20th century. They also, however, saw conflict with the United States as a strong possibility, especially as they began to seek raw materials and resources controlled by colonial powers in Southeast Asia, and as the United States gained control of the Philippines after 1898, any Japanese thrust into Southeast Asia would have to pass through or near a U.S. colony, making conflict with the U.S. inevitable.
Japanese planners did, however, hold out the possibility of winning a quick war against the United States -- one in which a Japanese invasion of the Philippines, or a general move against Southeast Asia, resulted in a U.S. fleet sailing to the relief of the Philippines, where the Japanese could ambush and destroy it, after which the U.S. would sue for peace. Lest this seem overly ambitious, it's worth remembering that Japan had gained victory in the Russo-Japanese war after annihilating (both) Russian fleets, and in the first Sino-Japanese war after annihilating the Beiyang fleet, assuring it control of the Yellow Sea and an uninterrupted area for amphibious operations.
The Pearl Harbor attack was born out of this logic. Although Japanese war plans throughout the prewar years continuously stressed out-ranging and outfighting the American fleet, stressing quality over quantity, the range at which the fleet would be engaged -- or rather at which it should begin to be attritted -- kept being pushed outward, with new weapons (airplanes, submarines) adding to the Japanese offensive arsenal. The goal became to attrit the U.S. fleet before a final battle of annihilation, and striking first at the fleet in harbor began to be seriously considered as the Japanese war in China and Indochina, stalled and the government faced a coup if it did not secure more resources for that fight. Striking the American fleet in port became a way for Japan to buy time to build a defensive perimeter.
You can read more in this thread about the Pearl Harbor attack -- also make sure to check out this post and follow ups by u/ParkSungJun for more.