Sorry to hear of your situation and for the delayed reply.
p0299 indicates turbo under boost. Before writing off the turbo if get your mechanic to check the turbo pipes, as over time these can perish and where they attach to the turbo they can let sir through when under pressure but would look fine when not under pressure if that makes sense.
Your second fault code 05171 supports my theory as it implies a boost leak from a pipe or similar.