-(ㄹ/을) 듯 말 듯 => barely, almost, just about doing something (close to, but not quite happening).
말다 means "to not do something", so the expression combines "something happening" with "not happening(말다)".
As 닿다 means "touch", 닿을 듯 말 듯 is "just about touching (but not quite)".
알아가다 means "get to know someone/something", probably "get to know a person over time" in this context.
And if so, 닿다 in this context may also be a figurative way of saying "have an encounter with someone".
And 닿을 듯 말 듯(,) 알아갈 듯 말 듯 has two -듯 말 듯 phrases one after another - like separated by a comma.
So the whole phrase probably means "barely running into each other, on the verge of getting to know each other".
(But since it is missing the "who" or "what" part, we can't be sure without more of the context)
Other -듯 말 듯 examples:
- 비가 올 듯 말 듯 한다: It looks almost raining, but not quite yet.
- 들릴 듯 말 듯 한 작은 소리: a barely audible weak sound".
- 생각이 날 듯 말 듯 하다: It's on the tip of my tongue / I can almost but not quite remember.