How do i substract value from a gameobject method(see code)

This is my piece of script

transform.DOMove((enemy.ClosestTarget().transform.position), .3f);

how could i substract a specific value from that “(enemy.ClosestTarget().transform.position)”.

Enemy is a reference to another script, and ClosestTarget is a method inside that script, closest target is a gameobject method and it returns the closest object.
In this case i want to take that position and substract a certain number, it works without but i’d like to move the player a little far away than the exact position.

In case anyone needs it:

public GameObject ClosestTarget()
    {
        GameObject[] gos;
        gos = GameObject.FindGameObjectsWithTag(enemyTag);
        GameObject closest = null;
        float distance = maxDistance;
        float currAngle = maxAngle;
        Vector3 position = transform.position;

        // If there's already a current target and it's still within range, return it
        if (currentTarget && (currentTarget.position - transform.position).magnitude < maxDistance)
        {
            return currentTarget.gameObject;
        }
        else
        {
            isTargeting = false;
        }

        foreach (GameObject go in gos)
        {
            Vector3 diff = go.transform.position - position;
            float curDistance = diff.magnitude;
            if (curDistance < distance)
            {
                Vector3 viewPos = mainCamera.WorldToViewportPoint(go.transform.position);
                Vector2 newPos = new Vector3(viewPos.x - 0.5f, viewPos.y - 0.5f);
                if (Vector3.Angle(diff.normalized, mainCamera.transform.forward) < maxAngle)
                {
                    closest = go;
                    currAngle = Vector3.Angle(diff.normalized, mainCamera.transform.forward.normalized);
                    distance = curDistance;
                }
            }
        }

       
        return closest;
    }

A position is a vector, a number is a scalar.

Do you mean instead, “how do I adjust a position by a distance in a given direction?”

If so, and given:

Vector3 position = ...
Vector3 direction = ...
float distance = ...

Then:

Vector3 adjustedPosition = position + direction * distance;

Otherwise, not sure what you might intend by subtracting a scalar from a vector.

i’d like to extract the position from enemy.ClosestTarget().transform.position, to then subtract a number, for examle:
vecto3 ex = new Vector3((enemy.ClosestTarget().transform.position.x) -2f), it doesnt work obviously, i literally want to create a vector3 out of that information

i found a workaround, i give the enemy a rigid body and adjusted the angular drag, so that the force of the impact moves the enemy and i dont need to move the player instaed

You can create a new vector and subtract it from the one you have:
vecto3 ex = enemy.ClosestTarget().transform.position - new Vector3(-2f,0,0);