The first "/b.jsp" says to the server "Look for b.jsp in the root of this web application". In this case, it doesn't matter where a.jsp is. You could move it from "/" to "/pages/" to "/pages/directoryToHoldPageA/" or any other sub-directories and the app would still know how to find page B.jsp. This link would only be broken if you were to move B.jsp. You can move A.jsp to any location within the application and it would still know where to find B.jsp.
The second, is relative to the location of A.jsp. The ".." is the symbol for parent directory. So "../B.js" says to the server "Look one directory higher than the one that I (A.jsp) am in for a page named B.jsp". If you move either A.jsp, or B.jsp, and the move doesn't result in B.jsp being in the parent of the directory that holds A.jsp, the link will be broken.