Last first, bow on attacks are going to be the easiest, be it from plane or PT boat.
Because the fleets are so fast, it takes a lot of lead to hit them. While I'm no expert from the PT boat I'd try to come in from 30 - 40 degrees, would probably put the bow of the carrier on the edge of my monitor. Then try to hold that course until acks are splashing all around me. At that point start firing your spread. Fire the first one where you think should be about right, then add more lead as you drop each succeeding torpedo.
Beam attack, because of the speeds involved ends up as a torpedo coming in from their rear quarter, so it takes a lot of lead. If it was me I'd probably set it up offline.
Go into arena settings and turn off protect objects.
This will let you shoot at and hit your own carrier.
Spawn from the carrier, run ahead turn and setup your attack.
Fire your spread, because your attacking your own carrier you won't be blown to pieces before you torps hit.
Throttle back and let your torps run just ahead of you, watch where they pass, count any hits, etc.
Rolex did a very good writeup on torpedo attacks. Much of it will hold true for PT boats as well.
Rockets, well I have hit carrier at about 4k with them, once. But its not easy, takes a lot of kentucky windage and elevation. Guess, fire one, be patient, wait for the water splash. Try to see if you were long or short.
40mm range, now thats a hard one, as I've never tried to hit anything past 2k out with it.
If I was going to try I'd probably use the twin 37mm in the rear, as it has a LOT more ammo.
Without testing I'm not sure if the bullets will be modeled out past 2k or not. I am pretty sure that the 37mm in the Ostwind is modeled to 4k or so as I killed a C-47 parked once at 3.5k out. Was pretty much a pure luck shot at a sitting target though.