I think I understand what you're asking.
In an object that has a different object,
From your example code, class B contains a pointer to an object of type A: A * testObject2;
new can be used to create a pointer to that object as shown. What about creating a pointer to that object that is a data member instead?
In that code the data member testObject2 is a pointer, but initially it doesn't point to anything in particular. You should not use it yet because you have no idea what it points to, and consequently it will probably crash your program or worse. You need to actually point the pointer to something. Usually you point things to null.
Since it is a pointer, it can be made to point to anything of the right type. Since it is a pointer to A, it can point to any object instance of class A. It can also point to a special value meaning "this does not point to anything", called NULL, nullptr, or 0.
You can point it to anything of the right type that makes sense for your program. You might set it to point to testObject1 since it is an instance of class A. You could set it to point to testObjA or test_1 since those are also instances of class A. You could create an object with new, and point to the newly created object.
You can even make data members that point to the object itself. In fact, one of these is automatically created for you, called "this".
There is an important detail for whatever pointers you use. Pointers point to things. If you point to something and then the thing gets destroyed, the pointer will continue to point to that spot. Even though the pointer still points there, once the object is destroyed the pointer is pointing to dead memory. If you try to use the pointer after something is destroyed your program will misbehave, and probably crash.
Which brings us to:
Is this good or bad for what reasons?
It is not good or bad. What really matters is that pointers point to things that actually exist or they be changed to point to a null value (NULL, nullptr, or 0). Controlling the lifetime of objects is an important part of programming and one of the most common reasons for programs to crash. Smart pointers can help with this, but ultimately the decision is up to the programmer to do whatever works for the program they're building.