After some scribbling here's how I solved it.
$("#img-container img").click((e) => {
// image reference
const img = $("#img-container img");
// consider scrolled page amount for later calcualtions
const scrollTop = $("body").scrollTop();
const scrollLeft = $("body").scrollLeft();
// calculate click x, y coords
let x = e.pageX + scrollLeft - e.target.offsetLeft;
let y = e.pageY + scrollTop - e.target.offsetTop;
// get original image dimensions
const originalWidth = e.target.naturalWidth;
const originalHeight = e.target.naturalHeight;
// calcualte the difference in dimensions with current image
const deltaWidth = originalWidth / img.width();
const deltaHeight = originalHeight / img.height();
// multiply the difference with x,y coords
x = Math.round(x * deltaWidth);
y = Math.round(y * deltaHeight);
console.log(x, y);
});
thanks for everyone's help