match wits (with one)
To engage one in a clash or competition of intelligence or shrewd resourcefulness. My friend and I love matching wits whenever we get together, though some people mistake our banter for actual arguments. Don't try to match wits with the professor, John—he'll talk you round in circles.
match wits (with someone)
Fig. to enter into intellectual competition with someone. Whenever I try to match wits with Fred, he always ends up running circles around me with his clever repartee.