Miss Machiko likes playing dumb
Miss Machiko really is aware that Mr. Yamagata is madly in love with her, and this is her way of dealing with it. Miss Machiko Has a Type
, and Mr. Yamagata doesn't meet the criteria, so she pretends she doesn't acknowledge his crush as to not hurt his feelings. It wouldn't be the first time she used trickery to reach an end. Not entirely likely but still probable.
Hiroshi is an alien
He's always inventing gadgets that even his science teacher Miss Machiko might not be able to build. He also behaves differently than every other male character on the show in terms of his attraction towards women. Plus, the characters have seen a UFO fly over them, and stories about aliens are constantly involved in plots. Maybe Hiroshi knows more than he lets on...