code is working properly.
Check the screenshots.
Screenshots


Also try it by making result as AsQueryable or AsEnumerable or by ToList as per your requirement.
C#
var infoDetails = db.InfoDetails.Where(u => u.InfoId == (db.InfoMasters.Where(x => x.recordid == Id)
.OrderByDescending(x => x.CreationDate)
.Select(x => x.InfoId).FirstOrDefault()))
.Select(t => new InfoListViewModel
{
Address = t.Address,
InfoId = t.InfoId,
Name = t.Name
}).AsQueryable();
var infoDetails1 = db.InfoDetails.Where(u => u.InfoId == (db.InfoMasters.Where(x => x.recordid == Id)
.OrderByDescending(x => x.CreationDate)
.Select(x => x.InfoId).FirstOrDefault()))
.Select(t => new InfoListViewModel
{
Address = t.Address,
InfoId = t.InfoId,
Name = t.Name
}).AsEnumerable();
var infoDetails2 = db.InfoDetails.Where(u => u.InfoId == (db.InfoMasters.Where(x => x.recordid == Id)
.OrderByDescending(x => x.CreationDate)
.Select(x => x.InfoId).FirstOrDefault()))
.Select(t => new InfoListViewModel
{
Address = t.Address,
InfoId = t.InfoId,
Name = t.Name
}).ToList();