In case one, in the prerequistes for task B, put task A with a start-to-start plus 2 days dependency. (e.g. if Task A is ask number 10 and task B is task numer 11, then the prerequisites of task 11 says (without the quotes) “10ss+2d”
don’t know of a way to do your second case, based on a percentage.