Maryam has come to Hanoi Twice
=>This is the second time Mary has come to Hanoi
come->came->come
This is+the first/the second/the third/..+S+have/has+V3/Ved+...
How long have they pained the house?
=>When did they paint the house
How long have/has+S+V3/Ved+...?
=When+did+S+V_infinitive+..?
I haven't been in Hanoi for ages
=> It's for ages since I (last) went to Hanoi'
It's for+time+since+S+V2/Ved+......