zu tun haben mitDativ · 3. Fall
to have to do with sb. / sth., to be dealing with sb. / sth.
an impersonal idiom with a fixed 'es' — not a general construction with 'tun'
Wir haben es hier mit einem ernsten Problem zu tun.
We are dealing with a serious problem here.
womit?damit