Assuming that all data for 9mm Luger is for pistol, what changes should be made to the loads for a carbine with 18" barrel?
For example, can I use 158 gr cast bullet and can H335 perform in this setting?
Shooting will be for accuracy at 50 to 100 yards in the first place.
158gr Cast????

In a 9mm? The things would be seated so deep that there won't be any room for powder. Trust me, I know. We did a quick measurement and was definately a no-go, don't even bother trying.
We shoot .38/.357M bullets in 9mm all the time in both an XD9 and an AR-9mm plus a buddy's GP K100. But the bullet we use is Lee's 105gr LSWC. It was the only readily available bullet that is
short enough to work in the 9mm Luger case. There are some commercial bullets available out there on the net that can be ordered but the key word for us was "readily available".
It took a long time to build up a load that both guns like. The AR likes some loads but wouldn't cycle the XD. Higher loads left tons of lube and some lead in the barrel. You can size them to .356 but they shoot ok with no leading sized at .358 but you have to resize and band lube these bullets. It didn't work so good with just LLA like with other bullets in other calibers.
Now that we finally got them to work without fouling and cycling both the handguns and the AR, they shoot like a dream.

These bullets are really accurate even in the .357Magnum with H110 loads.

We both don't shoot lead RN at all anymore and permanently set our dies for these bullets. Only trouble is, I'm the one with the mold and the luber/sizer so I got to do enough for both of us at the same time.
