Deductions & credits

can these costs be from the original purchase of the property AND the sale of the property?