I am trying to search a mailbox by passing email ID and subject
Depends which Email Id are you trying to search with ? the only Id that would be searchable is the internetmessageId if you have the GraphId/itemid you don't need to search just try a get using the identifier.
To search using the internetmessageId you can use
https://graph.microsoft.com/v1.0/me/messages?$filter=internetMessageId eq '<12340@blah1234.onmicrosoft.com>'
There's actually 3 different ways of searching for messages a Filter, Search and the Graph Search endpoint so for Subject you can use either a KQL query
https://graph.microsoft.com/v1.0/me/messages?$search="subject:\"Fwd: Subject string to search\""
or and exact filter match
https://graph.microsoft.com/v1.0/me/messages?$filter=subject eq 'Subject to search'
or startswith
https://graph.microsoft.com/v1.0/me/messages?$filter=startsWith(subject,'test')
or you can also use the search API https://learn.microsoft.com/en-us/graph/search-concept-messages