OK, well every year is different. In 1985, the 35hp had been derated to a 30hp…In any event, I just checked one part number, the cylinder/crankcase for that year. The 25hp and 30hp had different part numbers for the crankcase, probably due to port changes between the two hp engines.
So, the answer here is no, there are more differences between these two engines than just the carb. That being said, you could surely try the larger carb on your 25hp, there will probably be a difference, but not a 45% power gain. I emphasize the term "try" because I don’t want you spending big bucks for the larger carb only to be disappointed, or find there is a high speed jetting problem.