I’d guess the figure of 25,000 relates to the estimate by the Royal College of Nursing that the NHS has a shortfall of that amount of nursing staff.
One year’s salary for 25,000 newly qualified nurses would cost about £550 million, so even factoring in different pay bands for actual unfilled positions you’d probably be left with a hefty chunk of change. Alternatively, if the actual cost of the Tory DUP pact is nearer the £2 billion figure that was floating around earlier, then £1.75 Billion would train 25,000 nurses.