So I’m pretty sure you can do all this in the editor which I think would be easier since you already have your buttons on the canvas.
Down where it says OnClick() and then you decide what you want to do, you can click on the plus sign (+) to add a new event. If I remember correctly, there should be an option like on pointer enter, and then you can change your button sprite from the series of selections. You’ll probably want to do the same for OnPointerExit to change it back too. But this way, you don’t have to create a script and for the buttons to do this.
I wish I could show you via pictures, but my Unity is updating currently. Maybe if you need clarification I could show you more of what I mean in a bit…
That being said, if you really want to handle it with scripts, you’re well on your way. I’d just add something like this:
public void OnPointerEnter (PointerEventData eventData)
{
button2.GetComponent<Button>().image= image2; // or at least something similar to this...
}