I observe Custard powder and pudding mix is same just combine it with milk, cook to thicken, and you have custard or pudding.Can they use as a replacement of one another?
Sometimes it is, sometimes it isn't. Depends on what the manufacturer put inside.
The term "pudding" is somewhat broadly defined. It can include eggs, or starch, or both, or even be applied to kinds of dessert which are not made from thickened milk. "Custard" is somewhat more specific, I would insist that a custard is always egg thickened, and that the most typical custard is yolk thickened - but it can include starch sometimes.
Manufacturers of powders who write "pudding" will almost always use starch (although sometimes they use modified starch, which ends up tasting differently than homemade pudding), and sometimes also powdered egg. Manufacturers of powders with the label "custard" might use pure egg powder, or a combination of a starch and egg, but they could also just decide to label it "custard" even if it doesn't include egg.
So, I would expect that they are in principle different, because a "pudding" sachet is very likely to contain starch and no egg, and a "custard" sachet is very likely to contain an egg, and no starch, or little starch. But due to inconsistent labelling, if you just grab a package of each from a random brand, you can end up with the opposite case, or with two packages containing the same thickener.