C# how to move a sphere from point A To B By Random and Time ?

hello
i am working on my new game
i want the shpere to go from boint A To Point B
By Random
i mean it have to go after some time not always
maybe after 5 secounds
go to A
After 5 sec go to B
How To Do That
that is my trying

public float A , B ;
    // Use this for initialization
    void Start () {
        A = transform.position.x  ;

        B = transform.position.x ;
        A = 20 ;
        B = -20 ;
   
    }
   
    // Update is called once per frame
    void Update () {
        transform.Translate(new Vector3(Random.Range(A,B),0,0) ) ;

   
    }
}

??

???