How to find image "A" coordinates on image "B" which contains image "A".

I wrote this program which is only checking pixel values, does anyone know is there any library tool do this.

Edit
Report