The story Danny3414Danny Mc G is likely referring to would be William Sleator's Singularity, published in 1985.
Sixteen-year-old identical twins Harry and Barry learn that their mysterious great-uncle has died, and his house and possessions now belong to their mother. The brothers travel to Sushan, Illinois, to examine the house and its contents. Inside the cobweb-filled home, the rival brothers find mysterious animal skeletons and other odd objects. Outside Uncle Ambrose's residence, Harry and Barry find a small metal-reinforced building, which according to the accompanying keys, is called the "playhouse." When the twins explore the playhouse, they discover that the properties of time are altered inside, and the playhouse may explain the eccentricities of their great-uncle. When their quirky and cute neighbor Lucy enters their lives, competition between the twins escalates, and Harry makes a decision that will change the nature of their relationship forever.