drama where there is a detective from a rich family who is not very good who meets an intelligent poor girl who helps him with cases for money

Maybeeee
Goritekini Arienai: Tantei Kamizuru Ryoko no Kaimei - it is not completely fitting, since he is the one who is super smart and the younger less fortunate one but she is also constantly in money needs and is also very smart. It is a great detective story 

Somehow Nemesis pops out in my head. But the main male character is not a very rich guy.

It could be more helpful if you can provide when do you watch it

Trick.. Yukie nakama poor magician and Abe Hiroshi a rich professor.. 

There is another one that name I've forgotten, where the main guy was a rich professor and a poor student helps him solve cases. He gets more famous and she gets money to pay bills and rents. 

Another is after dinner mystery.. 

Kitagawa keiko pretends to be a poor woman and helps a silly detective who is rich to solve cases. 

But Kitagawa keiko is actually very rich and it's her butler who actually solves the cases..