Answer:
to,by
Step-by-step explanation:
The correct form is
We went to Ram's house by taxi.
You can ask the question where did we go?
And you will surely say we went to so here you will use to because you are referring to a place of arrival and also “to” can be used when referring to a direction of movement.
And we use by when we are referring to how we did something like your sentence how did we get to Ram's house we went by taxi.