If you want one object to look parallel to the sight-direction of another object, you can simply turn it into the same rotation:
this.transform.rotation = target.transform.rotation;
But if you want one object to look at whatever thing another object is looking at, you first need to figure out where that other thing is, because the direction would differ depending on if it's something directly in front of the other object or something at the horizon.
One option is to do a raycast from the other object to find the point where its line of sight is broken and then use LookAt
for that point.
RaycastHit hit;
if (Physics.Raycast(target.transform.position, target.transform.rotation.eulerAngles, out hit)) {
this.transform.LookAt(hit.point);
}
Note that Physics.Raycast is only broken by objects with colliders.
target
is looking at (how do you define that?)? \$\endgroup\$