I don't get why this question gets asked so often. Really, I don't. Is it that hard...? Nothing personal by the way, it's just something I've noticed. But, to answer your question: Jon (and the ones that were with him) and Sansa both speak the same language. I think it's safe to someone told her back at camp.
At the Battle Meeting, Sansa said to Ramsey, You willdie tomorrow ord Bolton... sleep well. Then she rode off. She did not hear the conversatoin about the dogs, ramsey said it after she left.
So clearly, Jon told her, after the beating, and he was taken away..that was when she asked where Ramsey was. We didnt see the conversation, but Ramsey was already tied up in the Kennels, so there is no other way Sansa could have known he was there, unless someone told her. IF she knew he was at the Kennels she wouldn't have had to ask.
It's an error. And it isn't nitpicky...it is very noticeable if you watch it more than once. And, hello, Sansa rides away from the war council before Ramsay talks about his dogs. It's an error that should have been resolved in the sequence.
Its entirely conceivable that Jon and the crew talked about it back at camp. Its not too much of a stretch. Think of it like the time after Sansa met up with Jon at Castle Black and they were talking about how Sansa treated Jon when they were growing up. Technically - we never saw Jon and Sansa together on screen - so then using the same logic question...then perhaps Jon never saw Sansa when they were growing up together because we never saw them together on screen - in any episode. Its completely logical to think that they had some interaction while growing up, even though we didn't actually see it.
Your question is one of a very very small detail - one that can be explained by hearsay. Maybe she should have said "Jon said you said you starved your dogs for seven days" or "Jon told me you said....", but that makes an awkward line. Much more powerful to say "you said it yourself...." which is true, he (Ramsey) did say it himself.
Its not a stupid or nitpicky question. It was definitely an error in production. It was originaly suppose to be Jon who fed Ramsy to his own dogs and spoke the line of the dogs starving. Sansa was suppose to look on and smile. For some reason production felt that giving Sansa the role of Executioner would be more impactful, and I think they were right. They just didn't pay attention to some minor details like this one. There is another error in detail in this episode with Sansa, and it is also because they chose to give her the executioner line instead of Jon. This is what happens when they change things in a hurry.
The thing is, there's not really much time for idle chit-chat, like who fed what dogs when... The sequence goes:
1) Sansa rides away from the parlay
2) Bolton says the "7 days" thing to Jon
3) Battle of the Bastards
4) The capture and imprisonment of Ramsay.
Now, I can no longer recall if Sansa and Jon have their "the battle was lost until you came with the Knights of the Vale ('who have also been known to say "Ni..." on occasion') conversation before or after she oversees the death of Ramsay. If this conversation happens AFTER Ramsay's death, then it's likely the first conversation between the siblings since Sansa rode of at #1 above. If it happens BEFORE Ramsay's death, then it's believable that the "7 days" nugget might have been shared between the Stark siblings. Well, between Jon Targaryen and Sansa Stark.