I am new to BP, but based on my experience with other reptiles I would say setting up the 40 gallon for a baby would be difficult. If you are using a UTH meant for a 40 gallon, and try to block off part of the tank it's going to be hard to establish a temp gradient. a overhead bulb would be easier but still difficult in that amount of space. I would just get a tub and a smaller heat mat.