Moving an object relative to another... Kinda?

This is kinda hard to explain.
I have a gameObject that, when the B Key is pressed, generates two targets as Empty gameObjects. One target (bTarget) is directly beneath it whilst the other (specialTarget) is in front by 10 along the X axis.
The gameObject proceeds to move towards specialTarget along X, once it reaches it, the specialTarget moves back to the bTarget and both are destroyed when the gameObject reaches them. So basically it’s a straight-line boomerang.

I have it set up and the targets will work if the Object is facing up the X Axis, but when it turns to look down the X Axis, the specialTarget appears where it would if I had faced right/up the X Axis.
I think I’ve isolated the problem code;

		specialTarget.transform.rotation = targetB.transform.rotation;
		specialTarget.transform.position = new Vector3 (targetB.transform.position.x += 10f, targetB.transform.position.y, targetB.transform.position.z);

Like I said, I think the problem is the new Vector 3 but I’m not sure how to get it to position it 10 forward from my targetB.
Please help?

If I understand your problem correctly, it seems like your code would spawn the special target at the same location regardless of what direction the gameObject is facing. Could you test this by say setting gameObject at x = 0 and testing a different rotation each play of game. Right now it seems like its set up to spawn the special target 10 units away along the GLOBAL x-axis and what you wish for is to spawn it 10 units away in front along the LOCAL forward axis. A solution would be to use and scale transform.forward which is the unit vector directed along the local forward axis. (The following code assumes that the targetB forward axis points towards where you want to spawn the special target)

specialTarget.transform.position = targetB.transform.position + targetB.transform.forward * 10;