You can’t translate this literally into English, of course.
But your effort to disentangle it isn’t quite right. S. not asking directly what useful and appropriate stuff the art of medicine gives to what, but rather by virtue of giving what useful and appropriate stuff to what it’s called medicine.
It’s not the double interrogative words themselves that are the problem here. We can do this in English: when I walk my energetic 100 lb. malamute, people say to me all the time “Who’s walking who?” (never “whom” of course). The problem is that the interrogative words are packed into the participial phrase, and the participial phrase is, as often in Greek, a key point of the sentence, rather than subordinate.
To translate this you have to resort to something like:
“By virtue of giving back what useful/owed and appropriate stuff to what things is the healing tekhne called ‘healing’?”
Maybe you could make an assumption that is implicitly built into the Greek explicit:
“A certain tekhne is called ‘medical’ because it gives useful and appropriate stuff to something. By virtue of giving what to what is this tekhne called ‘medical’?”
τίσιν ἀποδιδῶσιν ὀφειλόμενον καὶ προσῆκον ἡ τέχνη ἰατρική; – this doesn’t quite get there (and ἀποδιδῶσιν should be ἀποδίδωσιν). Above all, you need καλεῖται–that’s the real question–and, as Paul noted, ἰατρικὴ is predicative.
The only way to simplify the Greek into two sentences is to change τί in one to τι and drop τίσιν in the other.
ἡ οὖν τί ἀποδιδοῦσα ὀφειλόμενον καὶ προσῆκον τέχνη ἰατρικὴ καλεῖται;
ἡ τίσιν οὖν ἀποδιδοῦσά τι ὀφειλόμενον καὶ προσῆκον τέχνη ἰατρικὴ καλεῖται;
(There’s a separate problem with ἀποδιδοῦσα, which means “give back,” not “give”. Socrates is using this word to echo the quote from Simonides, while creating an misleading analogy equating dikaiosune with a techne.)