API call to match Record_IDs on Linked columns


I have CarTable with a linked field to EngineTypeTable and another linked field to ManufacturerTable. I have the record_id from a record in EngineTypeTable and a second record_id from a record in ManufacturerTable. I want to create an API call on CarTable that returns all the CarTable records with linked field columns that respectively match the record_ids that I have. How can I do this? Is it possible with filterByFormula?