Theres more to it than that.
I see you are in CA.
I doubt the truck you described has a heavy front end, so it is likely good for 12,000#. The drives good for 34,000#. A tag trailer MAY be allowed 34,000# on a tandem, but it will depend on the overall length, as well as the axle spacings. There are many exceptions, and the rules on it are enough to make your head spin.
To simplify some, you MAY be legal on the truck to 46,000 gross. That would leave you a 26,000 payload. Then you have to take off the tongue weight of the tag trailer, which would ideally be about 4,000 plus or minus for a 20 ton tag. Now you can theoretically carry a 22,000 load and make weight, as long as you can balance the load to be even over all the axles.
On the trailer, IF it is long enough to bridge 34,000, and IF it weighs about 8,000 empty, and IF you get 4,000 on the tongue, you could possibly be able to carry 30,000. I doubt that all those things would come together right, and you can probably legal somewhere around a 26,000 payload on the tag, IF it is long enough.
The best way to do it is spend some time at a set of scales, but before that, do some research on the California DOT website.
Also keep in mind that if you are hauling equipment, you can get annual permits for much more weight, as long as the truck is rated for it.
Hope this helps. It can be confusing.