most people leased or rented their house, so my guess is there was the option of continuing on the lease on 47 Hardwick street, possibly at a good rate. Maybe Jeremiah had connections due to his occupation that helped with this. Since Jeremiah died very young it seems very unlikely that he he could have purchased the house and land, so I would think Brigid must have had some kind of income to be able to stay on... possibly also took in lodgers as you mentioned. (this wouldn't necessarily be mentioned in directory listings as long as she stayed on at the address)
Electoral Rolls back to 1898 are planned to be added to the
Dublin City Library website, which might help answer this.
There's no land owner mentioned on the 1901 form B for the address, but this is often left blank.
I've had a search through various listings and see quite a few land agents offices scattered around the city and suburbs - nothing specific showing up for Dublin Castle. Not sure exactly their work involves, but they often appear in a section titled 'Land & Estate Agents'.
Where did Brigid move to ?