Deductions & credits

Any help on this would be appreciated as the solution does not seem to be documented anywhere.