In the MWE below, created following other threads from the website, I would like to know how to change the following two things:
1) How to add the buttons which link back to the question (E.g. the button "Back to problem 1.1" in the MWE below) at the end of the solution, as I have done with the button "Solution" which comes at the end of the question.
2) The hyperlinks from the solutions back to the questions seem to be a bit off, i.e. they link back somewhere lower than the actual start of the question.
Thank you very much.
\documentclass[10pt,A4paper]{article}
\usepackage{answers}
\usepackage{amsthm}
\usepackage{hyperref}
\usepackage{tcolorbox}
\usepackage{ifthen}
\usepackage{tikz}
\usetikzlibrary{shadows}
\tikzstyle{buttonstyle} = [rectangle, fill = black!30, draw = black!80, drop shadow, font={\sffamily\bfseries}, text=white]
\newcommand*{\button}[1]{\tikz[baseline=(text.base)]{\node[buttonstyle] (text) {#1};}}
\theoremstyle{definition}
\newtheorem{problem}{%
\hypertarget{soln:\theproblem}{}
}[section]
\Newassociation{soln}{mySoln}{Solutions}
\renewenvironment{mySoln}[1]
{\bigskip\noindent\phantomsection{\bfseries \hypertarget{problem:#1}{}
{\bfseries Solution to problem #1}\hfill
\hyperlink{soln:#1}{\button{Back to problem #1}}\\}\quad}
\newcommand{\marksol}{\vspace{0.2cm}\hyperlink{problem:\theproblem}{\button{Solution}}}
\newcommand{\bp}{\begin{problem}}
\newcommand{\enp}{\end{problem}}
\newcommand{\bs}{\marksol \begin{soln}}
\begin{document}
\newpage
\section{Assigned problems}
\Opensolutionfile{Solutions}
\bp Let $a$ and $b$ be positive real numbers. Prove that
\[\frac{a^2}{b}+\frac{b^2}{a}\geq a+b.\]
\bs We have
\[\frac{a^2}{b}+\frac{b^2}{a}-a-b=\frac{a^3+b^3-a^2b-ab^2}{ab}=\frac{(a-b)(a^2-b^2)}{ab}=\frac{(a-b)^2(a+b)}{ab}\geq 0.\]
\end{soln}
\enp
\bp Let $a,b,c,d$ be positive real numbers such that $a>b>c>d$ and $ad=bc$. Prove that $a+d>b+c$.
\bs Let $c=d\epsilon$, then $b=\frac{a}{\epsilon}$, where $\epsilon >1$. We need
to prove \[a+d \geq \frac{a}{\epsilon}+ d\epsilon\] that is
\[a\cdot \frac{\epsilon-1}{\epsilon}-d(\epsilon-1)\geq 0.\]
But this is equivalent to
\[\left(\frac{a}{\epsilon}-d\right)(\epsilon-1)\geq 0,\]
which is true because $\frac{a}{\epsilon}=b>d$ and $\epsilon>1$.
\end{soln}
\enp
\Closesolutionfile{Solutions}
\eject
\section{Solutions}
\input{Solutions.tex}
\end{document}