The initial cost of the building is $779,000 and has lost 2.7% of its value every year for 9 years. So the remaining amount is:
$779,000 (1 - 0.027)^9 = $608,909.88
and an upkeep of $35,900 per year:
$608,909.88 - (35,900 x 9) = $285,809.88
He had it rented for $810 per room per month:
$285,809.88 + (810 x 10 x 12 x 9) = 1,160,629.88
Therefore, his profit if he will sell the building is:
$ 1,160,629.88 - $ 779,000 = $381,609.88