so after a lot of trial and error and hours spent, here is the correct formula, so many hours spent on a simple formula, but it gave me so much dofamine when it started working
zx = -(mandelbrot.get_x_offset() - (mouse.x / mandelbrot.get_zoom_x()));
zy = -(mandelbrot.get_y_offset() - (mouse.y / mandelbrot.get_zoom_y()));